mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-10-28 07:44:21 +01:00
2135c6b9f1
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
19 lines
598 B
TypeScript
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"] },
|
|
]);
|
|
});
|