test: tighten twitch send assertions · openclaw/openclaw@7b21837
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -51,24 +51,25 @@ describe("twitchMessageActions", () => {
|
51 | 51 | messageId: "msg-1", |
52 | 52 | timestamp: 1, |
53 | 53 | }); |
| 54 | +const cfg = { |
| 55 | +channels: { |
| 56 | +twitch: { |
| 57 | +defaultAccount: "secondary", |
| 58 | +}, |
| 59 | +}, |
| 60 | +}; |
54 | 61 | |
55 | 62 | await twitchMessageActions.handleAction!({ |
56 | 63 | action: "send", |
57 | 64 | params: { message: "Hello!" }, |
58 | | -cfg: { |
59 | | -channels: { |
60 | | -twitch: { |
61 | | -defaultAccount: "secondary", |
62 | | -}, |
63 | | -}, |
64 | | -}, |
| 65 | + cfg, |
65 | 66 | } as never); |
66 | 67 | |
67 | | -expect(twitchOutbound.sendText).toHaveBeenCalledWith( |
68 | | -expect.objectContaining({ |
69 | | - accountId: "secondary", |
70 | | - to: "secondary-channel", |
71 | | -}), |
72 | | -); |
| 68 | +expect(twitchOutbound.sendText).toHaveBeenCalledWith({ |
| 69 | +cfg, |
| 70 | +to: "secondary-channel", |
| 71 | +text: "Hello!", |
| 72 | +accountId: "secondary", |
| 73 | +}); |
73 | 74 | }); |
74 | 75 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。