From 0445078c02ddd471ada32093f16af512fe45b749 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 02:53:25 +0100 Subject: [PATCH] test: tighten azure speech config assertions --- .../azure-speech/speech-provider.test.ts | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/extensions/azure-speech/speech-provider.test.ts b/extensions/azure-speech/speech-provider.test.ts index da5c68a9271..7a70c69c71e 100644 --- a/extensions/azure-speech/speech-provider.test.ts +++ b/extensions/azure-speech/speech-provider.test.ts @@ -98,21 +98,28 @@ describe("buildAzureSpeechProvider", () => { }, }); - expect(canonical).toEqual( - expect.objectContaining({ - apiKey: "key", - region: "eastus", - baseUrl: "https://eastus.tts.speech.microsoft.com", - voice: "en-US-AriaNeural", - }), - ); - expect(alias).toEqual( - expect.objectContaining({ - apiKey: "alias-key", - endpoint: "https://westus.tts.speech.microsoft.com/cognitiveservices/v1", - baseUrl: "https://westus.tts.speech.microsoft.com", - }), - ); + expect(canonical).toEqual({ + apiKey: "key", + region: "eastus", + endpoint: undefined, + baseUrl: "https://eastus.tts.speech.microsoft.com", + voice: "en-US-AriaNeural", + lang: "en-US", + outputFormat: "audio-24khz-48kbitrate-mono-mp3", + voiceNoteOutputFormat: "ogg-24khz-16bit-mono-opus", + timeoutMs: undefined, + }); + expect(alias).toEqual({ + apiKey: "alias-key", + region: undefined, + endpoint: "https://westus.tts.speech.microsoft.com/cognitiveservices/v1", + baseUrl: "https://westus.tts.speech.microsoft.com", + voice: "en-US-JennyNeural", + lang: "en-US", + outputFormat: "audio-24khz-48kbitrate-mono-mp3", + voiceNoteOutputFormat: "ogg-24khz-16bit-mono-opus", + timeoutMs: undefined, + }); }); it("parses provider-specific TTS directives", () => {