diff options
author | 2023-01-12 19:10:41 -0800 | |
---|---|---|
committer | 2023-01-12 19:10:41 -0800 | |
commit | 766f8ceebc76dd749ba5c104f802c7ebda289db9 (patch) | |
tree | f84ee560938188261f7f5604a65b83aae354a646 /test/bun.js/child_process-node.test.js | |
parent | c03f7c998dd22689412658177e3a5736ce6b9034 (diff) | |
parent | 32f8cb31be6fb5b0b9aea1c6d4e95d118e8ef816 (diff) | |
download | bun-766f8ceebc76dd749ba5c104f802c7ebda289db9.tar.gz bun-766f8ceebc76dd749ba5c104f802c7ebda289db9.tar.zst bun-766f8ceebc76dd749ba5c104f802c7ebda289db9.zip |
Merge branch 'main' into dylan/github-dependencies
Diffstat (limited to 'test/bun.js/child_process-node.test.js')
-rw-r--r-- | test/bun.js/child_process-node.test.js | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/test/bun.js/child_process-node.test.js b/test/bun.js/child_process-node.test.js index 3cb8cd9e1..41e3e6afc 100644 --- a/test/bun.js/child_process-node.test.js +++ b/test/bun.js/child_process-node.test.js @@ -1,7 +1,6 @@ -import { beforeAll, describe, it as it_ } from "bun:test"; +import { beforeAll, describe, expect, it } from "bun:test"; import { ChildProcess, spawn, exec } from "node:child_process"; import { - strictEqual, throws, assert, createCallCheckCtx, @@ -9,36 +8,7 @@ import { } from "node-test-helpers"; import { tmpdir } from "node:os"; import { gcTick } from "gc"; - -const it = (label, fn) => { - const hasDone = fn.length === 1; - if (fn.constructor.name === "AsyncFunction" && hasDone) { - return it_(label, async (done) => { - gcTick(); - await fn(done); - gcTick(); - }); - } else if (hasDone) { - return it_(label, (done) => { - gcTick(); - fn(done); - gcTick(); - }); - } else if (fn.constructor.name === "AsyncFunction") { - return it_(label, async () => { - gcTick(); - await fn(); - gcTick(); - }); - } else { - return it_(label, () => { - gcTick(); - fn(); - gcTick(); - }); - } -}; - +const strictEqual = (a, b) => expect(a).toStrictEqual(b); const debug = process.env.DEBUG ? console.log : () => {}; const platformTmpDir = require("fs").realpathSync(tmpdir()); |