diff --git a/test/unit/node/wrapper.test.ts b/test/unit/node/wrapper.test.ts new file mode 100644 index 000000000..7c8a6bf05 --- /dev/null +++ b/test/unit/node/wrapper.test.ts @@ -0,0 +1,18 @@ +import { ChildProcess } from "child_process" +import { ParentProcess, isChild } from "../../../src/node/wrapper" + +describe("wrapper", () => { + describe("isChild", () => { + it("should return false for parent process", () => { + const p = new ParentProcess("1") + expect(isChild(p)).toBe(false) + }) + }) + it("should return false for parent process", () => { + const p = new ChildProcess() + // our ChildProcess isn't exported + // and shouldn't be for a test so surpressing TS error. + // @ts-expect-error + expect(isChild(p)).toBe(false) + }) +})