- model-fallback hook: mock selectFallbackProvider and add _resetForTesting() to test-setup.ts to clear module-level state between files - fallback-retry-handler: add afterAll(mock.restore) and use mockReturnValueOnce to prevent connected-providers mock leaking to subsequent test files - opencode-config-dir: use win32.join for Windows APPDATA path construction so tests pass on macOS (path.join uses POSIX semantics regardless of process.platform override) - system-loaded-version: use resolveSymlink from file-utils instead of realpathSync to handle macOS /var -> /private/var symlink consistently All 4456 tests pass (0 failures) on full bun test suite.
9 lines
320 B
TypeScript
9 lines
320 B
TypeScript
import { beforeEach } from "bun:test"
|
|
import { _resetForTesting as resetClaudeSessionState } from "./src/features/claude-code-session-state/state"
|
|
import { _resetForTesting as resetModelFallbackState } from "./src/hooks/model-fallback/hook"
|
|
|
|
beforeEach(() => {
|
|
resetClaudeSessionState()
|
|
resetModelFallbackState()
|
|
})
|