Skip to content

Commit d283e73

Browse files
committed
test: tighten imessage deliver cache assertions
1 parent bd1b5b3 commit d283e73

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

extensions/imessage/src/monitor/deliver.test.ts

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,17 @@ describe("deliverReplies", () => {
152152
accountId: "acct-ignored",
153153
});
154154

155-
expect(sendMessageIMessageMock).toHaveBeenCalledWith(
156-
"chat_id:50",
157-
"durable hello",
158-
expect.objectContaining({ client }),
159-
);
155+
expect(sendMessageIMessageMock.mock.calls).toStrictEqual([
156+
[
157+
"chat_id:50",
158+
"durable hello",
159+
{
160+
config: IMESSAGE_TEST_CFG,
161+
accountId: "acct-ignored",
162+
client,
163+
},
164+
],
165+
]);
160166
expect(remember).toHaveBeenCalledWith("acct-5:chat_id:50", {
161167
text: "durable hello",
162168
messageId: "imsg-durable-1",
@@ -180,11 +186,17 @@ describe("deliverReplies", () => {
180186
accountId: "acct-ignored",
181187
});
182188

183-
expect(sendMessageIMessageMock).toHaveBeenCalledWith(
184-
"chat_id:60",
185-
"Visible reply",
186-
expect.objectContaining({ client }),
187-
);
189+
expect(sendMessageIMessageMock.mock.calls).toStrictEqual([
190+
[
191+
"chat_id:60",
192+
"Visible reply",
193+
{
194+
config: IMESSAGE_TEST_CFG,
195+
accountId: "acct-ignored",
196+
client,
197+
},
198+
],
199+
]);
188200
expect(remember).toHaveBeenCalledWith("acct-6:chat_id:60", {
189201
text: "Visible reply",
190202
messageId: "imsg-durable-2",

0 commit comments

Comments
 (0)