mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-11-12 01:00:56 +01:00
test: add unit test for potrace.ts
This commit is contained in:
1 parent
311d2516ce
commit
b1f70ec36c
2 files changed
+22
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { execFile as execFileOriginal } from "node:child_process";
|
||||
import { ExecFileFn } from "./types.ts";
|
||||
|
||||
export const properties = {
|
||||
from: {
|
||||
@@ -26,8 +27,8 @@ export function convert(
|
||||
fileType: string,
|
||||
convertTo: string,
|
||||
targetPath: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
options?: unknown,
|
||||
execFile: ExecFileFn = execFileOriginal,
|
||||
): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
execFile("potrace", [filePath, "-o", targetPath, "-b", convertTo], (error, stdout, stderr) => {
|
||||
|
||||
Reference in new issue
Block a user