mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-11-12 09:10:58 +01:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
21 lines
642 B
TypeScript
21 lines
642 B
TypeScript
import { expect, test } from "bun:test";
|
|
|
|
import { convert } from "../../src/converters/potrace";
|
|
import { runCommonTests } from "./helpers/commonTests";
|
|
import { createMockExecFile } from "./helpers/converters";
|
|
|
|
runCommonTests(convert);
|
|
|
|
test.each(["svg", "pdf", "eps", "dxf"])("selects the %s backend via -b", async (convertTo) => {
|
|
const { execFile, calls } = createMockExecFile();
|
|
|
|
await convert("in/bitmap.pbm", "pbm", convertTo, `out/bitmap.${convertTo}`, undefined, execFile);
|
|
|
|
expect(calls).toEqual([
|
|
{
|
|
cmd: "potrace",
|
|
args: ["in/bitmap.pbm", "-o", `out/bitmap.${convertTo}`, "-b", convertTo],
|
|
},
|
|
]);
|
|
});
|