From 4ddaafee689857a746d3ab0895617acc3a197e4a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 22 Feb 2026 07:47:01 +0000 Subject: [PATCH] test(plugins): use lightweight clears in wired hooks setup --- src/plugins/wired-hooks-after-tool-call.e2e.test.ts | 6 +++--- src/plugins/wired-hooks-compaction.test.ts | 6 +++--- src/process/supervisor/adapters/pty.test.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/wired-hooks-after-tool-call.e2e.test.ts b/src/plugins/wired-hooks-after-tool-call.e2e.test.ts index dae8cb74469..8ec506a5d33 100644 --- a/src/plugins/wired-hooks-after-tool-call.e2e.test.ts +++ b/src/plugins/wired-hooks-after-tool-call.e2e.test.ts @@ -68,11 +68,11 @@ describe("after_tool_call hook wiring", () => { }); beforeEach(() => { - hookMocks.runner.hasHooks.mockReset(); + hookMocks.runner.hasHooks.mockClear(); hookMocks.runner.hasHooks.mockReturnValue(false); - hookMocks.runner.runBeforeToolCall.mockReset(); + hookMocks.runner.runBeforeToolCall.mockClear(); hookMocks.runner.runBeforeToolCall.mockResolvedValue(undefined); - hookMocks.runner.runAfterToolCall.mockReset(); + hookMocks.runner.runAfterToolCall.mockClear(); hookMocks.runner.runAfterToolCall.mockResolvedValue(undefined); }); diff --git a/src/plugins/wired-hooks-compaction.test.ts b/src/plugins/wired-hooks-compaction.test.ts index 4553b2d8cb8..2292d95b760 100644 --- a/src/plugins/wired-hooks-compaction.test.ts +++ b/src/plugins/wired-hooks-compaction.test.ts @@ -29,11 +29,11 @@ describe("compaction hook wiring", () => { }); beforeEach(() => { - hookMocks.runner.hasHooks.mockReset(); + hookMocks.runner.hasHooks.mockClear(); hookMocks.runner.hasHooks.mockReturnValue(false); - hookMocks.runner.runBeforeCompaction.mockReset(); + hookMocks.runner.runBeforeCompaction.mockClear(); hookMocks.runner.runBeforeCompaction.mockResolvedValue(undefined); - hookMocks.runner.runAfterCompaction.mockReset(); + hookMocks.runner.runAfterCompaction.mockClear(); hookMocks.runner.runAfterCompaction.mockResolvedValue(undefined); }); diff --git a/src/process/supervisor/adapters/pty.test.ts b/src/process/supervisor/adapters/pty.test.ts index 654c5b44088..07df965beda 100644 --- a/src/process/supervisor/adapters/pty.test.ts +++ b/src/process/supervisor/adapters/pty.test.ts @@ -39,9 +39,9 @@ describe("createPtyAdapter", () => { }); beforeEach(() => { - spawnMock.mockReset(); - ptyKillMock.mockReset(); - killProcessTreeMock.mockReset(); + spawnMock.mockClear(); + ptyKillMock.mockClear(); + killProcessTreeMock.mockClear(); vi.useRealTimers(); });