test: extract duplicate code into another helper

This commit is contained in:
Jörg Krzeslak 2025-07-24 21:08:10 +02:00
parent c6006b58d2
commit c0105889ab
13 changed files with 58 additions and 244 deletions

View file

@ -1,24 +1,7 @@
import { test } from "bun:test";
import { convert } from "../../src/converters/libheif.ts";
import {
runConvertFailTest,
runConvertLogsStderror,
runConvertLogsStderrorAndStdout,
runConvertSuccessTest,
} from "./helpers/converters.ts";
import { runCommonTests } from "./helpers/commonTests.ts";
test("convert resolves when execFile succeeds", async () => {
await runConvertSuccessTest(convert);
});
runCommonTests(convert);
test("convert rejects when execFile fails", async () => {
await runConvertFailTest(convert);
});
test("convert logs stderr when present", async () => {
await runConvertLogsStderror(convert);
});
test("convert logs both stderr and stdout when present", async () => {
await runConvertLogsStderrorAndStdout(convert);
});
test.skip("dummy - required to trigger test detection", () => {});