diff options
author | 2023-03-07 12:22:34 -0800 | |
---|---|---|
committer | 2023-03-07 12:22:34 -0800 | |
commit | f7e4eb83694aa007a492ef66c28ffbe6a2dae791 (patch) | |
tree | 7af25aa5c42a2e1b2b47ba1df35f8caa9054cbeb /test/bun.js/process-args.test.js | |
parent | 36275a44ce7a33587bd26aad120042ab95470ff3 (diff) | |
download | bun-f7e4eb83694aa007a492ef66c28ffbe6a2dae791.tar.gz bun-f7e4eb83694aa007a492ef66c28ffbe6a2dae791.tar.zst bun-f7e4eb83694aa007a492ef66c28ffbe6a2dae791.zip |
Reorganize tests (#2332)
Diffstat (limited to 'test/bun.js/process-args.test.js')
-rw-r--r-- | test/bun.js/process-args.test.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/test/bun.js/process-args.test.js b/test/bun.js/process-args.test.js deleted file mode 100644 index a2c79616f..000000000 --- a/test/bun.js/process-args.test.js +++ /dev/null @@ -1,40 +0,0 @@ -import { spawn } from "bun"; -import { test, expect } from "bun:test"; -import { bunExe } from "./bunExe"; - -test("args exclude run", async () => { - const arg0 = process.argv[0]; - const arg1 = import.meta.dir + "/print-process-args.js"; - const exe = bunExe(); - const { stdout: s1 } = spawn([exe, "print-process-args.js"], { - cwd: import.meta.dir, - env: { BUN_DEBUG_QUIET_LOGS: "1" }, - }); - const t1 = JSON.parse(await new Response(s1).text()); - expect(t1[0]).toBe(arg0); - expect(t1[1]).toBe(arg1); - const { stdout: s2 } = spawn([exe, "print-process-args.js", "arg1"], { - cwd: import.meta.dir, - env: { BUN_DEBUG_QUIET_LOGS: "1" }, - }); - const t2 = JSON.parse(await new Response(s2).text()); - expect(t2[0]).toBe(arg0); - expect(t2[1]).toBe(arg1); - expect(t2[2]).toBe("arg1"); - const { stdout: s3 } = spawn([exe, "run", "print-process-args.js"], { - cwd: import.meta.dir, - env: { BUN_DEBUG_QUIET_LOGS: "1" }, - }); - const t3 = JSON.parse(await new Response(s3).text()); - expect(t3[0]).toBe(arg0); - expect(t3[1]).toBe(arg1); - const { stdout: s4 } = spawn([exe, "run", "print-process-args.js", "arg1", "arg2"], { - cwd: import.meta.dir, - env: { BUN_DEBUG_QUIET_LOGS: "1" }, - }); - const t4 = JSON.parse(await new Response(s4).text()); - expect(t4[0]).toBe(arg0); - expect(t4[1]).toBe(arg1); - expect(t4[2]).toBe("arg1"); - expect(t4[3]).toBe("arg2"); -}); |