mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
test(discord): accept native voice temp paths
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import path from "node:path";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { RequestClient } from "./internal/discord.js";
|
||||
import type { VoiceMessageMetadata } from "./voice-message.js";
|
||||
@@ -75,7 +76,8 @@ describe("ensureOggOpus", () => {
|
||||
const result = await ensureOggOpus("/tmp/input.ogg");
|
||||
|
||||
expect(result.cleanup).toBe(true);
|
||||
expect(result.path).toMatch(/^\/tmp\/voice-.*\.ogg$/);
|
||||
expect(path.dirname(result.path)).toBe(path.normalize("/tmp"));
|
||||
expect(path.basename(result.path)).toMatch(/^voice-.*\.ogg$/);
|
||||
expect(runFfmpegMock).toHaveBeenCalledWith(
|
||||
expect.arrayContaining(["-t", "1200", "-ar", "48000", "/tmp/input.ogg", result.path]),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user