test: add unit test for dvisvgm.ts

This commit is contained in:
Jörg Krzeslak 2025-07-24 11:40:11 +02:00
parent 3975c70de7
commit c47c1dd4f4
5 changed files with 99 additions and 5 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";
export const properties = {
from: {
@ -14,8 +15,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> {
const inputArgs: string[] = [];
if (fileType === "eps") {