test: add unit test for imagemagick.ts

This commit is contained in:
Jörg Krzeslak 2025-07-24 13:50:29 +02:00
parent 7f9c8868fd
commit f1730ede97
3 changed files with 198 additions and 6 deletions

View file

@ -1,4 +1,5 @@
import { execFile } from "node:child_process";
import { execFile as execFileOriginal } from "node:child_process";
import { ExecFileFn } from "./types.ts";
// declare possible conversions
export const properties = {
@ -445,8 +446,8 @@ export function convert(
fileType: string,
convertTo: string,
targetPath: string,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
options?: unknown,
execFile: ExecFileFn = execFileOriginal,
): Promise<string> {
let outputArgs: string[] = [];
let inputArgs: string[] = [];