Skip to content

Commit 238ad4c

Browse files
heavygeecursoragent
andcommitted
test(voice): isolate VOICE_BACKEND fallback test from leaked env vars
When hub/.env (operator-local) sets GEMINI_API_KEY, the 'falls back to elevenlabs for unknown VOICE_BACKEND values' test leaks gemini-live into the backends list. Delete the four non-elevenlabs key env vars defensively at the start of the test, mirroring the cleanup pattern used by the other tests in the same describe block. No behavior change. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d24d993 commit 238ad4c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

hub/src/web/routes/voice.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ describe('GET /api/voice/backend', () => {
254254

255255
test('falls back to elevenlabs for unknown VOICE_BACKEND values', async () => {
256256
process.env.VOICE_BACKEND = 'unknown-backend'
257+
delete process.env.GEMINI_API_KEY
258+
delete process.env.GOOGLE_API_KEY
259+
delete process.env.DASHSCOPE_API_KEY
260+
delete process.env.QWEN_API_KEY
257261
process.env.ELEVENLABS_API_KEY = 'test-el'
258262
const app = createApp()
259263
const headers = await authHeaders()

0 commit comments

Comments
 (0)