test: clear provider model cache after request tests (#2359)

This commit is contained in:
JATMN
2026-10-23 13:36:44 -07:00
committed by GitHub
parent e365805762
commit 3e81882b97
+2
View File
@@ -7,6 +7,7 @@ import {
registerGateway,
} from '../../integrations/index.js'
import { publicBuildVersion } from '../../utils/version.js'
import { resetModelStringsForTestingOnly } from '../../bootstrap/state.js'
// bun:test keeps mock.module() registrations process-global across test files.
// Load and re-register the real module before importing the client so a prior
@@ -328,6 +329,7 @@ afterEach(() => {
originalEnv.CLAUDE_CODE_PROVIDER_PROFILE_ENV_APPLIED_ID,
)
globalThis.fetch = originalFetch
resetModelStringsForTestingOnly()
} finally {
releaseSharedMutationLock()
}