diff --git a/src/infra/channel-runtime-context.test.ts b/src/infra/channel-runtime-context.test.ts index 19a784afde4..d21f55886c3 100644 --- a/src/infra/channel-runtime-context.test.ts +++ b/src/infra/channel-runtime-context.test.ts @@ -100,19 +100,29 @@ describe("channel runtime context helpers", () => { capability: "approval.native", }), ).toEqual({ client: "matrix" }); - expect(onEvent).toHaveBeenNthCalledWith( - 1, - expect.objectContaining({ - type: "registered", - context: { app: "slack" }, - }), - ); - expect(onEvent).toHaveBeenNthCalledWith( - 2, - expect.objectContaining({ - type: "unregistered", - }), - ); + expect(onEvent.mock.calls).toEqual([ + [ + { + type: "registered", + key: { + channelId: "slack", + accountId: "default", + capability: "approval.native", + }, + context: { app: "slack" }, + }, + ], + [ + { + type: "unregistered", + key: { + channelId: "slack", + accountId: "default", + capability: "approval.native", + }, + }, + ], + ]); persistentLease?.dispose(); unsubscribe?.();