test: tighten inworld tts failure assertion

This commit is contained in:
Peter Steinberger
2026-05-09 01:42:45 +01:00
parent b81414be45
commit bf273c451a

View File

@@ -335,7 +335,9 @@ describe("inworldTTS", () => {
it("releases the guarded dispatcher after failure", async () => {
const { release } = queueGuardedResponse(new Response("fail", { status: 500 }));
await expect(inworldTTS({ text: "test", apiKey: "test-key" })).rejects.toThrow();
await expect(inworldTTS({ text: "test", apiKey: "test-key" })).rejects.toThrow(
"Inworld TTS API error (500): fail",
);
expect(release).toHaveBeenCalledTimes(1);
});
});