mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
test: tighten twitch send assertions
This commit is contained in:
@@ -51,24 +51,25 @@ describe("twitchMessageActions", () => {
|
||||
messageId: "msg-1",
|
||||
timestamp: 1,
|
||||
});
|
||||
const cfg = {
|
||||
channels: {
|
||||
twitch: {
|
||||
defaultAccount: "secondary",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
await twitchMessageActions.handleAction!({
|
||||
action: "send",
|
||||
params: { message: "Hello!" },
|
||||
cfg: {
|
||||
channels: {
|
||||
twitch: {
|
||||
defaultAccount: "secondary",
|
||||
},
|
||||
},
|
||||
},
|
||||
cfg,
|
||||
} as never);
|
||||
|
||||
expect(twitchOutbound.sendText).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
accountId: "secondary",
|
||||
to: "secondary-channel",
|
||||
}),
|
||||
);
|
||||
expect(twitchOutbound.sendText).toHaveBeenCalledWith({
|
||||
cfg,
|
||||
to: "secondary-channel",
|
||||
text: "Hello!",
|
||||
accountId: "secondary",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -318,7 +318,13 @@ describe("send", () => {
|
||||
secondaryAccount,
|
||||
"secondary-channel",
|
||||
"Hello!",
|
||||
expect.any(Object),
|
||||
{
|
||||
channels: {
|
||||
twitch: {
|
||||
defaultAccount: "secondary",
|
||||
},
|
||||
},
|
||||
},
|
||||
"secondary",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user