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

@@ -0,0 +1,19 @@
import { test } from "bun:test";
import { convert } from "../../src/converters/resvg.ts";
import {
runConvertFailTest,
runConvertLogsStderror,
runConvertSuccessTest,
} from "./helpers/converters.ts";
test("convert resolves when execFile succeeds", async () => {
await runConvertSuccessTest(convert);
});
test("convert rejects when execFile fails", async () => {
await runConvertFailTest(convert);
});
test("convert logs stderr when present", async () => {
await runConvertLogsStderror(convert);
});