test: add unit test for libjxl.ts

This commit is contained in:
Jörg Krzeslak 2025-07-24 17:56:19 +02:00
parent 5957873534
commit 311d2516ce
2 changed files with 82 additions and 2 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 = {
@ -17,8 +18,8 @@ export 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 tool = "";
if (fileType === "jxl") {