test: extract duplicate code into another helper
This commit is contained in:
parent
c6006b58d2
commit
c0105889ab
13 changed files with 58 additions and 244 deletions
|
|
@ -1,24 +1,7 @@
|
|||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/inkscape.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", () => {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue