mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
avoid loading and initializing CLI config twice in non-interactive mode (#5793)
This commit is contained in:
@@ -150,6 +150,18 @@ describe('Server Config (config.ts)', () => {
|
||||
|
||||
await expect(config.initialize()).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
it('should throw an error if initialized more than once', async () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
checkpointing: false,
|
||||
});
|
||||
|
||||
await expect(config.initialize()).resolves.toBeUndefined();
|
||||
await expect(config.initialize()).rejects.toThrow(
|
||||
'Config was already initialized',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('refreshAuth', () => {
|
||||
|
||||
Reference in New Issue
Block a user