mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
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:
parent
de47c4e98b
commit
eb7dc53d2e
1 changed files with 2 additions and 1 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue