

























@@ -71,7 +71,7 @@ describe("azure speech tts", () => {
71717272expect(result).toEqual(Buffer.from("mp3"));
7373expect(fetchMock).toHaveBeenCalledOnce();
74-const [url, init] = fetchMock.mock.calls.at(0) as [string, RequestInit];
74+const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];
7575expect(url).toBe("https://eastus.tts.speech.microsoft.com/cognitiveservices/v1");
7676expect(init.method).toBe("POST");
7777const headers = new Headers(init.headers);
@@ -109,7 +109,7 @@ describe("azure speech tts", () => {
109109});
110110111111expect(fetchMock).toHaveBeenCalledOnce();
112-const [url, init] = fetchMock.mock.calls.at(0) as [string, RequestInit];
112+const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];
113113expect(url).toBe("https://custom.example.com/cognitiveservices/voices/list");
114114expect(new Headers(init.headers).get("Ocp-Apim-Subscription-Key")).toBe("speech-key");
115115expect(init.signal).toBeInstanceOf(AbortSignal);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。