test: tighten discord action option assertions · openclaw/openclaw@0ed57bf
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/actions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -338,7 +338,7 @@ describe("handleDiscordMessagingAction", () => {
|
338 | 338 | maxSelections: 2, |
339 | 339 | durationHours: 24, |
340 | 340 | }, |
341 | | -expect.any(Object), |
| 341 | +{ cfg: DISCORD_TEST_CFG, content: undefined }, |
342 | 342 | ); |
343 | 343 | }); |
344 | 344 | |
@@ -370,7 +370,11 @@ describe("handleDiscordMessagingAction", () => {
|
370 | 370 | }, |
371 | 371 | } as OpenClawConfig; |
372 | 372 | await handleMessagingAction("readMessages", { channelId: "C1" }, enableAllActions, cfg); |
373 | | -expect(readMessagesDiscord).toHaveBeenCalledWith("C1", expect.any(Object), { cfg }); |
| 373 | +expect(readMessagesDiscord).toHaveBeenCalledWith( |
| 374 | +"C1", |
| 375 | +{ limit: undefined, before: undefined, after: undefined, around: undefined }, |
| 376 | +{ cfg }, |
| 377 | +); |
374 | 378 | }); |
375 | 379 | |
376 | 380 | it("adds normalized timestamps to fetchMessage payloads", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。