From 605fb9731db9b1f52c35ca2d4ff1cf79bb7ddfc6 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 11 May 2026 12:06:05 +0100 Subject: [PATCH] test: tighten channel runtime context assertions --- src/infra/channel-runtime-context.test.ts | 36 +++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) 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?.();