test: export type to be usable in test
This commit is contained in:
parent
435f654cbe
commit
4fa471263f
2 changed files with 2 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { execFile as execFileOriginal } from "node:child_process";
|
import { execFile as execFileOriginal } from "node:child_process";
|
||||||
|
|
||||||
type ExecFileFn = (
|
export type ExecFileFn = (
|
||||||
cmd: string,
|
cmd: string,
|
||||||
args: string[],
|
args: string[],
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
import type { ExecFileException } from "node:child_process";
|
import type { ExecFileException } from "node:child_process";
|
||||||
import { expect, test } from "bun:test";
|
import { expect, test } from "bun:test";
|
||||||
import { convert } from "../src/converters/assimp";
|
import { convert, ExecFileFn } from "../src/converters/assimp";
|
||||||
|
|
||||||
type ExecFileFn = (
|
|
||||||
cmd: string,
|
|
||||||
args: string[],
|
|
||||||
callback: (err: Error | null, stdout: string, stderr: string) => void,
|
|
||||||
) => void;
|
|
||||||
|
|
||||||
test("convert resolves when execFile succeeds", async () => {
|
test("convert resolves when execFile succeeds", async () => {
|
||||||
const originalConsoleLog = console.log;
|
const originalConsoleLog = console.log;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue