test: add unit test for graphicsmagick.ts
This commit is contained in:
parent
72b484a480
commit
7f9c8868fd
2 changed files with 22 additions and 2 deletions
19
tests/converters/graphicsmagick.test.ts
Normal file
19
tests/converters/graphicsmagick.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { test } from "bun:test";
|
||||
import { convert } from "../../src/converters/graphicsmagick.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);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue