diff options
author | 2022-12-06 17:09:21 -0800 | |
---|---|---|
committer | 2022-12-06 17:10:14 -0800 | |
commit | 5f3a6f2bf3b91c6c4fa0ad7f4197863ef6980889 (patch) | |
tree | d34b52c4620abafe6b669ce1e8c65cc147ea8741 /test/bun.js/process-args.test.js | |
parent | 58185e139a9c8502e5a6afcd5ab5f9682552a731 (diff) | |
download | bun-5f3a6f2bf3b91c6c4fa0ad7f4197863ef6980889.tar.gz bun-5f3a6f2bf3b91c6c4fa0ad7f4197863ef6980889.tar.zst bun-5f3a6f2bf3b91c6c4fa0ad7f4197863ef6980889.zip |
add server scheduleDeinit, ignore logs in test
Diffstat (limited to 'test/bun.js/process-args.test.js')
-rw-r--r-- | test/bun.js/process-args.test.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/bun.js/process-args.test.js b/test/bun.js/process-args.test.js index 512b6b92c..3b5749239 100644 --- a/test/bun.js/process-args.test.js +++ b/test/bun.js/process-args.test.js @@ -4,34 +4,32 @@ import { test, expect } from "bun:test"; test("args exclude run", async () => { const arg0 = process.argv[0]; const arg1 = import.meta.dir + "/print-process-args.js"; - const exe = process.versions.bun.includes("debug") ? "bun-debug" : "bun"; - 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 }, + { cwd: import.meta.dir, env: { BUN_DEBUG_QUIET_LOGS: "1" } }, ); const t4 = JSON.parse(await new Response(s4).text()); expect(t4[0]).toBe(arg0); |