diff --git a/extensions/twitch/src/actions.test.ts b/extensions/twitch/src/actions.test.ts index f214f20c0426..592317e77bd1 100644 --- a/extensions/twitch/src/actions.test.ts +++ b/extensions/twitch/src/actions.test.ts @@ -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", + }); }); }); diff --git a/extensions/twitch/src/send.test.ts b/extensions/twitch/src/send.test.ts index 2ceb098ae62c..f2f8c8f1839f 100644 --- a/extensions/twitch/src/send.test.ts +++ b/extensions/twitch/src/send.test.ts @@ -318,7 +318,13 @@ describe("send", () => { secondaryAccount, "secondary-channel", "Hello!", - expect.any(Object), + { + channels: { + twitch: { + defaultAccount: "secondary", + }, + }, + }, "secondary", ); });