test: tighten twitch send assertions

This commit is contained in:
Shakker
2026-05-10 17:58:46 +01:00
parent cfc41ffd65
commit 7b218375f7
2 changed files with 21 additions and 14 deletions
+14 -13
View File
@@ -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",
});
});
});
+7 -1
View File
@@ -318,7 +318,13 @@ describe("send", () => {
secondaryAccount,
"secondary-channel",
"Hello!",
expect.any(Object),
{
channels: {
twitch: {
defaultAccount: "secondary",
},
},
},
"secondary",
);
});