avoid loading and initializing CLI config twice in non-interactive mode (#5793)

This commit is contained in:
Jacob MacDonald
2025-08-07 14:19:06 -07:00
committed by GitHub
parent 53f8617b24
commit 19491b7b94
6 changed files with 201 additions and 61 deletions

View File

@@ -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', () => {