diff --git a/src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts b/src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts index 5c7e0f8b..a0d799a2 100644 --- a/src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts +++ b/src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts @@ -1,5 +1,8 @@ -import { beforeEach, describe, expect, mock, test } from "bun:test" +import { afterAll, beforeEach, describe, expect, mock, test } from "bun:test" import type { PluginInput } from "@opencode-ai/plugin" +import * as originalExecutor from "./executor" +import * as originalParser from "./parser" +import * as originalLogger from "../../shared/logger" const executeCompactMock = mock(async () => {}) const getLastAssistantMock = mock(async () => ({ @@ -24,6 +27,12 @@ mock.module("../../shared/logger", () => ({ log: () => {}, })) +afterAll(() => { + mock.module("./executor", () => originalExecutor) + mock.module("./parser", () => originalParser) + mock.module("../../shared/logger", () => originalLogger) +}) + function createMockContext(): PluginInput { return { client: {