test: change order of parameters in ExecFileFn type
This commit is contained in:
parent
eac22d53d3
commit
af68498494
24 changed files with 36 additions and 68 deletions
|
|
@ -121,7 +121,7 @@ export async function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("assimp", ["export", filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("assimp", ["export", filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export async function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("ebook-convert", [filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("ebook-convert", [filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,25 +30,20 @@ export function convert(
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile(
|
execFile("dvisvgm", [...inputArgs, filePath, "-o", targetPath], (error, stdout, stderr) => {
|
||||||
"dvisvgm",
|
if (error) {
|
||||||
[...inputArgs, filePath, "-o", targetPath],
|
reject(`error: ${error}`);
|
||||||
options,
|
}
|
||||||
(error, stdout, stderr) => {
|
|
||||||
if (error) {
|
|
||||||
reject(`error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stdout) {
|
if (stdout) {
|
||||||
console.log(`stdout: ${stdout}`);
|
console.log(`stdout: ${stdout}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stderr) {
|
if (stderr) {
|
||||||
console.error(`stderr: ${stderr}`);
|
console.error(`stderr: ${stderr}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve("Done");
|
resolve("Done");
|
||||||
},
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -735,7 +735,6 @@ export async function convert(
|
||||||
execFile(
|
execFile(
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
[...ffmpegArgs, "-i", filePath, ...extraArgs, targetPath],
|
[...ffmpegArgs, "-i", filePath, ...extraArgs, targetPath],
|
||||||
options,
|
|
||||||
(error, stdout, stderr) => {
|
(error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ export function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("gm", ["convert", filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("gm", ["convert", filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,6 @@ export function convert(
|
||||||
execFile(
|
execFile(
|
||||||
"magick",
|
"magick",
|
||||||
[...inputArgs, filePath, ...outputArgs, targetPath],
|
[...inputArgs, filePath, ...outputArgs, targetPath],
|
||||||
options,
|
|
||||||
(error, stdout, stderr) => {
|
(error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("inkscape", [filePath, "-o", targetPath], options, (error, stdout, stderr) => {
|
execFile("inkscape", [filePath, "-o", targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("heif-convert", [filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("heif-convert", [filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export function convert(
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile(tool, [filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile(tool, [filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ export function convert(
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("soffice", args, options, (error, stdout, stderr) => {
|
execFile("soffice", args, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export function convert(
|
||||||
// We need to use --outfile to specify the target path
|
// We need to use --outfile to specify the target path
|
||||||
const args = ["--outfile", targetPath, filePath];
|
const args = ["--outfile", targetPath, filePath];
|
||||||
|
|
||||||
execFile("msgconvert", args, options, (error, stdout, stderr) => {
|
execFile("msgconvert", args, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(new Error(`msgconvert failed: ${error.message}`));
|
reject(new Error(`msgconvert failed: ${error.message}`));
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ export function convert(
|
||||||
args.push("-o", targetPath);
|
args.push("-o", targetPath);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("pandoc", args, options, (error, stdout, stderr) => {
|
execFile("pandoc", args, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,25 +31,20 @@ export function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile(
|
execFile("potrace", [filePath, "-o", targetPath, "-b", convertTo], (error, stdout, stderr) => {
|
||||||
"potrace",
|
if (error) {
|
||||||
[filePath, "-o", targetPath, "-b", convertTo],
|
reject(`error: ${error}`);
|
||||||
options,
|
}
|
||||||
(error, stdout, stderr) => {
|
|
||||||
if (error) {
|
|
||||||
reject(`error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stdout) {
|
if (stdout) {
|
||||||
console.log(`stdout: ${stdout}`);
|
console.log(`stdout: ${stdout}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stderr) {
|
if (stderr) {
|
||||||
console.error(`stderr: ${stderr}`);
|
console.error(`stderr: ${stderr}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve("Done");
|
resolve("Done");
|
||||||
},
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export function convert(
|
||||||
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
execFile: ExecFileFn = execFileOriginal, // to make it mockable
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("resvg", [filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("resvg", [filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
export type ExecFileFn = (
|
export type ExecFileFn = (
|
||||||
cmd: string,
|
cmd: string,
|
||||||
args: string[],
|
args: string[],
|
||||||
options: import("child_process").ExecFileOptions | unknown | undefined | null,
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
|
options?: import("child_process").ExecFileOptions,
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
export type ConvertFnWithExecFile = (
|
export type ConvertFnWithExecFile = (
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export function convert(
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
execFile("vips", [action, filePath, targetPath], options, (error, stdout, stderr) => {
|
execFile("vips", [action, filePath, targetPath], (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ export function convert(
|
||||||
execFile(
|
execFile(
|
||||||
"latexmk",
|
"latexmk",
|
||||||
["-xelatex", "-interaction=nonstopmode", `-output-directory=${outputPath}`, filePath],
|
["-xelatex", "-interaction=nonstopmode", `-output-directory=${outputPath}`, filePath],
|
||||||
options,
|
|
||||||
(error, stdout, stderr) => {
|
(error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`error: ${error}`);
|
reject(`error: ${error}`);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ test("convert respects eps filetype", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -69,7 +68,6 @@ test("convert respects pdf filetype", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -96,7 +94,6 @@ test("convert respects svgz conversion target type", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ let calls: string[][] = [];
|
||||||
function mockExecFile(
|
function mockExecFile(
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
args: string[],
|
args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
) {
|
) {
|
||||||
calls.push(args);
|
calls.push(args);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ export async function runConvertSuccessTest(convertFn: ConvertFnWithExecFile) {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(null, "Fake stdout", "");
|
callback(null, "Fake stdout", "");
|
||||||
|
|
@ -31,7 +30,6 @@ export async function runConvertFailTest(convertFn: ConvertFnWithExecFile) {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(new Error("Test error"), "", "");
|
callback(new Error("Test error"), "", "");
|
||||||
|
|
@ -53,7 +51,6 @@ export async function runConvertLogsStderror(convertFn: ConvertFnWithExecFile) {
|
||||||
const mockExecFile = (
|
const mockExecFile = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(null, "", "Fake stderr");
|
callback(null, "", "Fake stderr");
|
||||||
|
|
@ -82,7 +79,6 @@ export async function runConvertLogsStderrorAndStdout(convertFn: ConvertFnWithEx
|
||||||
const mockExecFile = (
|
const mockExecFile = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(null, "Fake stdout", "Fake stderr");
|
callback(null, "Fake stdout", "Fake stderr");
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ test("convert respects ico conversion target type", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -78,7 +77,6 @@ test("convert respects ico conversion target type with svg as input filetype", a
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -116,7 +114,6 @@ test("convert respects ico conversion target type with emf as input filetype", a
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -158,7 +155,6 @@ test("convert respects emf as input filetype", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ test("convert uses djxl with input filetype being jxl", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
command = _cmd;
|
command = _cmd;
|
||||||
|
|
@ -69,7 +68,6 @@ test("convert uses cjxl with output filetype being jxl", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
command = _cmd;
|
command = _cmd;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ test("convert rejects conversion if input filetype is not msg and output type is
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(null, "Fake stdout", "");
|
callback(null, "Fake stdout", "");
|
||||||
|
|
@ -26,7 +25,6 @@ test("convert rejects conversion on error", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(new Error("Test error"), "", "");
|
callback(new Error("Test error"), "", "");
|
||||||
|
|
@ -50,7 +48,6 @@ test("convert logs stderr as warning", async () => {
|
||||||
const mockExecFile = (
|
const mockExecFile = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
callback(null, "", "Fake stderr");
|
callback(null, "", "Fake stderr");
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ test("convert uses action pdfload with filetype being pdf", async () => {
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
@ -69,7 +68,6 @@ test("convert uses action copy with filetype being anything but pdf", async () =
|
||||||
const mockExecFile: ExecFileFn = (
|
const mockExecFile: ExecFileFn = (
|
||||||
_cmd: string,
|
_cmd: string,
|
||||||
_args: string[],
|
_args: string[],
|
||||||
options: unknown,
|
|
||||||
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
callback: (err: ExecFileException | null, stdout: string, stderr: string) => void,
|
||||||
) => {
|
) => {
|
||||||
calls.push(_args);
|
calls.push(_args);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue