From 584c9bdeb2ecc99154acee70846695517cb698d3 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 16:08:36 +0100 Subject: [PATCH] test: check reply dispatch hook warnings --- src/plugins/wired-hooks-reply-dispatch.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/wired-hooks-reply-dispatch.test.ts b/src/plugins/wired-hooks-reply-dispatch.test.ts index 537fcdbd541..eac4889583d 100644 --- a/src/plugins/wired-hooks-reply-dispatch.test.ts +++ b/src/plugins/wired-hooks-reply-dispatch.test.ts @@ -80,9 +80,10 @@ describe("reply_dispatch hook runner", () => { queuedFinal: false, counts: { tool: 1, block: 0, final: 0 }, }); - expect(logger.error).toHaveBeenCalledWith( - expect.stringContaining("reply_dispatch handler from test-plugin failed: boom"), - ); + expect(logger.error).toHaveBeenCalledTimes(1); + expect(logger.error.mock.calls[0]).toEqual([ + "[hooks] reply_dispatch handler from test-plugin failed: boom", + ]); expect(succeeding).toHaveBeenCalledTimes(1); }); @@ -116,11 +117,10 @@ describe("reply_dispatch hook runner", () => { queuedFinal: false, counts: { tool: 1, block: 0, final: 0 }, }); - expect(logger.error).toHaveBeenCalledWith( - expect.stringContaining( - "reply_dispatch handler from test-plugin failed: timed out after 5ms", - ), - ); + expect(logger.error).toHaveBeenCalledTimes(1); + expect(logger.error.mock.calls[0]).toEqual([ + "[hooks] reply_dispatch handler from test-plugin failed: timed out after 5ms", + ]); expect(succeeding).toHaveBeenCalledTimes(1); } finally { vi.useRealTimers();