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,10 @@
import { afterAll, beforeEach, describe, expect, mock, test } from "bun:test"
mock.module("../../shared", () => ({
mock.module("../../shared/logger", () => ({
log: mock(() => {}),
}))
mock.module("../../shared/connected-providers-cache", () => ({
readConnectedProvidersCache: mock(() => null),
readProviderModelsCache: mock(() => null),
}))