diff options
| author | Jacob MacDonald <[email protected]> | 2025-08-07 14:19:06 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-07 21:19:06 +0000 |
| commit | 19491b7b940912c2fb3fe24b2f189d3fd5668669 (patch) | |
| tree | 6112b96d342a87bea824caa405e5786715a0ab2f /packages/core/src/config/config.test.ts | |
| parent | 53f8617b249c9f0443f5082a293a30504a118030 (diff) | |
avoid loading and initializing CLI config twice in non-interactive mode (#5793)
Diffstat (limited to 'packages/core/src/config/config.test.ts')
| -rw-r--r-- | packages/core/src/config/config.test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/core/src/config/config.test.ts b/packages/core/src/config/config.test.ts index 64692139..8e6ca38f 100644 --- a/packages/core/src/config/config.test.ts +++ b/packages/core/src/config/config.test.ts @@ -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', () => { |
