























@@ -53,18 +53,16 @@ describe("vydra speech provider", () => {
5353timeoutMs: 30_000,
5454});
555556-expect(fetchMock).toHaveBeenNthCalledWith(
57-1,
58-"https://www.vydra.ai/api/v1/models/elevenlabs/tts",
59-expect.objectContaining({
60-method: "POST",
61-body: JSON.stringify({
62-text: "OpenClaw test",
63-voice_id: "21m00Tcm4TlvDq8ikWAM",
64-}),
56+expect(fetchMock).toHaveBeenCalledTimes(2);
57+const [url, init] = fetchMock.mock.calls[0] as [string, RequestInit];
58+expect(url).toBe("https://www.vydra.ai/api/v1/models/elevenlabs/tts");
59+expect(init.method).toBe("POST");
60+expect(init.body).toBe(
61+JSON.stringify({
62+text: "OpenClaw test",
63+voice_id: "21m00Tcm4TlvDq8ikWAM",
6564}),
6665);
67-const [, init] = fetchMock.mock.calls[0] as [string, RequestInit];
6866const headers = new Headers(init.headers);
6967expect(headers.get("authorization")).toBe("Bearer vydra-test-key");
7068expect(result.outputFormat).toBe("mp3");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。