Files
ConvertX/tests/converters/graphicsmagick.test.ts
T
Emrik Östling 2135c6b9f1 chore: use bun fmt and bun check (#685)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-23 18:23:49 +02:00

19 lines
598 B
TypeScript

import { expect, test } from "bun:test";
import { convert } from "../../src/converters/graphicsmagick";
import { runCommonTests } from "./helpers/commonTests";
import { createMockExecFile } from "./helpers/converters";
runCommonTests(convert);
test("convert applies EXIF auto-orient", async () => {
const { execFile, calls } = createMockExecFile();
const result = await convert("input.jpg", "jpg", "pdf", "output.pdf", undefined, execFile);
expect(result).toBe("Done");
expect(calls).toEqual([
{ cmd: "gm", args: ["convert", "input.jpg", "-auto-orient", "output.pdf"] },
]);
});