diff options
author | 2023-01-11 20:21:07 -0800 | |
---|---|---|
committer | 2023-01-11 20:21:41 -0800 | |
commit | e65def0f82482a08521ec608efa6d8c14a700270 (patch) | |
tree | 05669f35121188bc3cbffffe3326ad2f2ea4c862 | |
parent | 79707042228760b0413df1b32d38c67c904a08b1 (diff) | |
download | bun-e65def0f82482a08521ec608efa6d8c14a700270.tar.gz bun-e65def0f82482a08521ec608efa6d8c14a700270.tar.zst bun-e65def0f82482a08521ec608efa6d8c14a700270.zip |
Remove extra wrapper
-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()); |