@@ -333,15 +333,15 @@ describe("buildMinimaxSpeechProvider", () => {
|
333 | 333 | }); |
334 | 334 | |
335 | 335 | function firstFetchCall(): unknown[] { |
336 | | -const call = vi.mocked(globalThis.fetch).mock.calls.at(0); |
| 336 | +const call = vi.mocked(globalThis.fetch).mock.calls[0]; |
337 | 337 | if (!call) { |
338 | 338 | throw new Error("Expected MiniMax TTS fetch call"); |
339 | 339 | } |
340 | 340 | return call as unknown[]; |
341 | 341 | } |
342 | 342 | |
343 | 343 | function firstFetchInit(): RequestInit | undefined { |
344 | | -return firstFetchCall().at(1) as RequestInit | undefined; |
| 344 | +return firstFetchCall()[1] as RequestInit | undefined; |
345 | 345 | } |
346 | 346 | |
347 | 347 | function firstFetchBody(): Record<string, unknown> { |
@@ -376,7 +376,7 @@ describe("buildMinimaxSpeechProvider", () => {
|
376 | 376 | expect(result.audioBuffer.toString()).toBe("fake-audio-data"); |
377 | 377 | |
378 | 378 | expect(mockFetch).toHaveBeenCalledOnce(); |
379 | | -const url = firstFetchCall().at(0); |
| 379 | +const url = firstFetchCall()[0]; |
380 | 380 | expect(url).toBe("https://api.minimaxi.com/v1/t2a_v2"); |
381 | 381 | const body = firstFetchBody(); |
382 | 382 | expect(body.model).toBe("speech-2.8-hd"); |
@@ -505,7 +505,7 @@ describe("buildMinimaxSpeechProvider", () => {
|
505 | 505 | timeoutMs: 30000, |
506 | 506 | }); |
507 | 507 | |
508 | | -const url = firstFetchCall().at(0); |
| 508 | +const url = firstFetchCall()[0]; |
509 | 509 | const init = firstFetchInit(); |
510 | 510 | expect(url).toBe("https://api.minimaxi.com/v1/t2a_v2"); |
511 | 511 | expect(init?.headers).toEqual({ |
|