feat: add test for handling comma-only API key in getLLMConfig
This commit is contained in:
@@ -105,4 +105,11 @@ describe('getLLMConfig', () => {
|
||||
assert.equal(cfg.provider, 'ollama');
|
||||
assert.equal(cfg.model, 'llama3');
|
||||
});
|
||||
|
||||
it('comma-only api key is treated as not set', () => {
|
||||
process.env.OPENAI_API_KEY = ',,,';
|
||||
const cfg = getLLMConfig();
|
||||
assert.equal(cfg.provider, null);
|
||||
assert.deepEqual(cfg.apiKeys, []);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user