test: fix discord external output mock typing

This commit is contained in:
Peter Steinberger
2026-05-07 04:42:28 +01:00
parent 252a76d25c
commit f65e357e00

View File

@@ -72,7 +72,8 @@ describe("ensureOggOpus", () => {
it("re-encodes .ogg opus when sample rate is not 48kHz", async () => {
runFfprobeMock.mockResolvedValueOnce("opus,24000\n");
runFfmpegMock.mockImplementationOnce(async (args: string[]) => {
runFfmpegMock.mockImplementationOnce(async (...callArgs: unknown[]) => {
const args = callArgs[0] as string[];
const outputPath = args.at(-1);
if (typeof outputPath !== "string") {
throw new Error("missing ffmpeg output path");
@@ -95,7 +96,8 @@ describe("ensureOggOpus", () => {
});
it("re-encodes non-ogg input with bounded ffmpeg execution", async () => {
runFfmpegMock.mockImplementationOnce(async (args: string[]) => {
runFfmpegMock.mockImplementationOnce(async (...callArgs: unknown[]) => {
const args = callArgs[0] as string[];
const outputPath = args.at(-1);
if (typeof outputPath !== "string") {
throw new Error("missing ffmpeg output path");