fix(cli): isolate modelConfigUtils tests from system env vars

Use a clean process.env object instead of shallow-copying the original
environment. This prevents test failures when system has auth-related
env vars (e.g., OPENAI_API_KEY) that would interfere with test assertions.
This commit is contained in:
tanzhenxin 2026-01-20 09:36:28 +08:00
parent de47c4e98b
commit eb7dc53d2e

View file

@ -31,7 +31,8 @@ describe('modelConfigUtils', () => {
beforeEach(() => {
vi.resetModules();
process.env = { ...originalEnv };
// Start with a clean env - getAuthTypeFromEnv only checks auth-related vars
process.env = {};
});
afterEach(() => {