From a717a95e133fd261793602327e87450a1e1f978a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 18 Feb 2026 17:43:16 +0900 Subject: [PATCH] fix: clear spy call history in completion-verbose-logging test spyOn(console, 'log') accumulates calls across test files in bun:test. Add mockClear() after spy creation to prevent cross-file contamination when run in the same bun test batch as completion.test.ts. --- src/cli/run/completion-verbose-logging.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cli/run/completion-verbose-logging.test.ts b/src/cli/run/completion-verbose-logging.test.ts index 3c2fc0397..ff9adfcf4 100644 --- a/src/cli/run/completion-verbose-logging.test.ts +++ b/src/cli/run/completion-verbose-logging.test.ts @@ -33,6 +33,7 @@ describe("checkCompletionConditions verbose waiting logs", () => { it("does not print busy waiting line when verbose is disabled", async () => { // given const consoleLogSpy = spyOn(console, "log").mockImplementation(() => {}) + consoleLogSpy.mockClear() const ctx = createMockContext({ childrenBySession: { "test-session": [{ id: "child-1" }], @@ -54,6 +55,7 @@ describe("checkCompletionConditions verbose waiting logs", () => { it("prints busy waiting line when verbose is enabled", async () => { // given const consoleLogSpy = spyOn(console, "log").mockImplementation(() => {}) + consoleLogSpy.mockClear() const ctx = createMockContext({ childrenBySession: { "test-session": [{ id: "child-1" }],