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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, mock, test } from "bun:test"
|
||||
/// <reference types="bun-types" />
|
||||
|
||||
mock.module("./logger", () => ({ log: (..._args: unknown[]) => {} }))
|
||||
import { beforeEach, describe, expect, test } from "bun:test"
|
||||
|
||||
import {
|
||||
applyDisabledProviders,
|
||||
|
||||
Reference in New Issue
Block a user