mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 12:50:54 -04:00
test(env): cover loading REQUESTY_API_KEY from provider env files
Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@ const TEST_ENV_KEYS = [
|
||||
'OPENAI_BASE_URL',
|
||||
'OPENAI_MODEL',
|
||||
'OPENCLAUDE_OLLAMA_NUM_CTX',
|
||||
'REQUESTY_API_KEY',
|
||||
'OLLAMA_API_KEY',
|
||||
'OLLAMA_BASE_URL',
|
||||
...PROVIDER_SELECTION_FLAGS,
|
||||
@@ -411,6 +412,17 @@ describe('loadEnvFile', () => {
|
||||
expect(loaded).toEqual({ LLMTR_API_KEY: 'llmtr-key' })
|
||||
})
|
||||
|
||||
it('loads the dedicated Requesty credential without selecting a route', () => {
|
||||
const filePath = writeTempEnvFile('REQUESTY_API_KEY=requesty-key')
|
||||
|
||||
const loaded = loadEnvFile(filePath)
|
||||
|
||||
expect(process.env.REQUESTY_API_KEY).toBe('requesty-key')
|
||||
expect(process.env.CLAUDE_CODE_USE_OPENAI).toBeUndefined()
|
||||
expect(process.env.OPENAI_BASE_URL).toBeUndefined()
|
||||
expect(loaded).toEqual({ REQUESTY_API_KEY: 'requesty-key' })
|
||||
})
|
||||
|
||||
it('loads the dedicated Command Code credential without selecting a route', () => {
|
||||
const filePath = writeTempEnvFile('CMD_API_KEY=cmd-key')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user