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.
This commit is contained in:
YeonGyu-Kim
2026-02-18 17:43:16 +09:00
parent 7b3a64b77e
commit a717a95e13

View File

@@ -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" }],