mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:50:42 +00:00
test: align media temp path assertions
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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")),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user