mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-11-12 09:10:58 +01:00
test: add unit test for ffmpeg.ts
This commit is contained in:
1 parent
c47c1dd4f4
commit
72b484a480
2 files changed
+160
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
|
||||
// This could be done dynamically by running `ffmpeg -formats` and parsing the output
|
||||
export const properties = {
|
||||
@@ -691,8 +692,8 @@ export async function convert(
|
||||
fileType: string,
|
||||
convertTo: string,
|
||||
targetPath: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
options?: unknown,
|
||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||
): Promise<string> {
|
||||
let extraArgs: string[] = [];
|
||||
let message = "Done";
|
||||
|
||||
Reference in new issue
Block a user