fix(test): narrow mock.module() targets in background-agent tests to prevent barrel corruption

Three test files were mocking the entire '../../shared' barrel, which
corrupted exports for subsequent test files in the same batch run.
Narrow mocks to specific submodules (logger, connected-providers-cache).

Also reverts Bun version pin since the root cause was mock scope, not Bun.
This commit is contained in:
YeonGyu-Kim
2026-04-04 16:56:39 +09:00
parent 99ae6d91d0
commit eb4060d739
5 changed files with 14 additions and 11 deletions
@@ -1,7 +1,7 @@
import { describe, test, expect, mock, afterAll } from "bun:test"
const mockLog = mock()
mock.module("../../shared", () => ({ log: mockLog }))
mock.module("../../shared/logger", () => ({ log: mockLog }))
afterAll(() => { mock.restore() })