test: add unit test for resvg.ts

This commit is contained in:
Jörg Krzeslak 2025-07-24 18:02:13 +02:00
parent b1f70ec36c
commit d8cbc0aaee
3 changed files with 23 additions and 3 deletions

View file

@ -28,7 +28,7 @@ export function convert(
convertTo: string,
targetPath: string,
options?: unknown,
execFile: ExecFileFn = execFileOriginal,
execFile: ExecFileFn = execFileOriginal, // to make it mockable
): Promise<string> {
return new Promise((resolve, reject) => {
execFile("potrace", [filePath, "-o", targetPath, "-b", convertTo], (error, stdout, stderr) => {