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();