test: align media temp path assertions

This commit is contained in:
Peter Steinberger
2026-05-08 06:10:05 +01:00
parent d4eb40248a
commit 87f9d5dbae
2 changed files with 4 additions and 2 deletions

View File

@@ -819,7 +819,7 @@ describe("applyMediaUnderstanding", () => {
"16000",
"-c:a",
"pcm_s16le",
expect.stringMatching(/telegram-voice\.wav$/),
expect.stringMatching(/telegram-voice\.wav.*\.part$/),
]),
);
expect(mockedRunExec).toHaveBeenCalledWith(

View File

@@ -79,7 +79,9 @@ describe("transcodeAudioBufferToOpus", () => {
if (!capturedOutputPath) {
throw new Error("missing ffmpeg output path");
}
expect(path.basename(capturedOutputPath)).toBe("escape.opus");
const outputBaseName = path.basename(capturedOutputPath);
expect(outputBaseName).toContain("escape.opus");
expect(outputBaseName).toMatch(/\.part$/);
await import("node:fs/promises").then((fs) =>
fs.writeFile(capturedOutputPath!, Buffer.from("opus-output")),
);