test: tighten senseaudio media file assertion

This commit is contained in:
Shakker
2026-05-11 00:54:50 +01:00
parent 7e12d8d54f
commit 7e1f3e3731

View File

@@ -78,7 +78,8 @@ describe("transcribeSenseAudioAudio", () => {
expect(form.get("language")).toBe("en");
expect(form.get("prompt")).toBe("hello");
const file = form.get("file") as Blob | { type?: string; name?: string } | null;
expect(file).toEqual(expect.objectContaining({ type: "audio/wav" }));
expect(file).not.toBeNull();
expect(file?.type).toBe("audio/wav");
if (file && "name" in file && typeof file.name === "string") {
expect(file.name).toBe("voice.wav");
}