test: tighten discord binding api assertions · openclaw/openclaw@4939954
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -223,13 +223,17 @@ describe("maybeSendBindingMessage", () => {
|
223 | 223 | }); |
224 | 224 | |
225 | 225 | expect(sendWebhookMessageDiscord).toHaveBeenCalledTimes(1); |
226 | | -expect(sendWebhookMessageDiscord.mock.calls[0]?.[1]).toMatchObject({ |
227 | | - cfg, |
228 | | -webhookId: "wh_1", |
229 | | -webhookToken: "tok_1", |
230 | | -accountId: "default", |
231 | | -threadId: "thread-1", |
232 | | -}); |
| 226 | +expect(sendWebhookMessageDiscord.mock.calls[0]).toEqual([ |
| 227 | +"hello webhook", |
| 228 | +{ |
| 229 | + cfg, |
| 230 | +webhookId: "wh_1", |
| 231 | +webhookToken: "tok_1", |
| 232 | +accountId: "default", |
| 233 | +threadId: "thread-1", |
| 234 | +username: "⚙️ main", |
| 235 | +}, |
| 236 | +]); |
233 | 237 | expect(sendMessageDiscord).not.toHaveBeenCalled(); |
234 | 238 | }); |
235 | 239 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。