From b6aa37201ad11d773a11a4ca42fcc82188ead119 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 12 May 2026 09:01:54 +0000 Subject: [PATCH] feat: add test for handling comma-only API key in getLLMConfig --- app/config.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/config.test.js b/app/config.test.js index 03cf9ac..c648520 100644 --- a/app/config.test.js +++ b/app/config.test.js @@ -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, []); + }); });