From 1d41ef724a2cb50945ae8699b3e1b5b759747a0a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 16 Apr 2026 17:03:12 +0100 Subject: [PATCH] test: isolate tts provider auto-selection env --- test/helpers/plugins/tts-contract-suites.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/helpers/plugins/tts-contract-suites.ts b/test/helpers/plugins/tts-contract-suites.ts index 4ebc8318397..7ca6f01cdfa 100644 --- a/test/helpers/plugins/tts-contract-suites.ts +++ b/test/helpers/plugins/tts-contract-suites.ts @@ -664,8 +664,19 @@ export function describeTtsConfigContract() { }); const config = resolveTtsConfig(cfg); const prefsPath = `/tmp/tts-prefs-google-model-provider-${Date.now()}.json`; - - expect(getTtsProvider(config, prefsPath)).toBe("google"); + withEnv( + { + OPENAI_API_KEY: undefined, + ELEVENLABS_API_KEY: undefined, + XI_API_KEY: undefined, + MINIMAX_API_KEY: undefined, + GEMINI_API_KEY: undefined, + GOOGLE_API_KEY: undefined, + }, + () => { + expect(getTtsProvider(config, prefsPath)).toBe("google"); + }, + ); }); });