From 9624914c2521054bde4c7161bc14c0ee0ae93c34 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 22 May 2026 00:05:53 +0900 Subject: [PATCH] test(disabled-providers): drop logger mock to fix global mock-module leakage mock.restore() in afterAll is global in Bun, so the previous attempt to satisfy mock-module-lifecycle-audit by pairing mock.module('./logger') with afterAll(() => mock.restore()) tore down mocks owned by other tests. Concretely, running this file before src/hooks/runtime-fallback produced 42 cascading fallback test failures. The logger mock was decorative - tests do not assert log calls, and the real logger only writes to oh-my-opencode.log in the OS temp dir. Drop the mock entirely so the audit has nothing to score and other tests keep their mocks intact. --- src/shared/disabled-providers.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/disabled-providers.test.ts b/src/shared/disabled-providers.test.ts index ba705bbcd..4f21e7d0a 100644 --- a/src/shared/disabled-providers.test.ts +++ b/src/shared/disabled-providers.test.ts @@ -1,6 +1,6 @@ -import { beforeEach, describe, expect, mock, test } from "bun:test" +/// -mock.module("./logger", () => ({ log: (..._args: unknown[]) => {} })) +import { beforeEach, describe, expect, test } from "bun:test" import { applyDisabledProviders,