diff options
| author | 2023-01-17 16:28:49 -0800 | |
|---|---|---|
| committer | 2023-01-17 16:28:49 -0800 | |
| commit | 848658c533afb3f14b1f87591624bdf48ed28979 (patch) | |
| tree | d20597478ad80a7983f67ad84320ddb8c2a21d4b /test/bun.js/log-test.test.ts | |
| parent | 37d2a98331c9481157d8cba1220425a554d1425f (diff) | |
| download | bun-848658c533afb3f14b1f87591624bdf48ed28979.tar.gz bun-848658c533afb3f14b1f87591624bdf48ed28979.tar.zst bun-848658c533afb3f14b1f87591624bdf48ed28979.zip | |
[test] Add helper for bun env
Diffstat (limited to 'test/bun.js/log-test.test.ts')
| -rw-r--r-- | test/bun.js/log-test.test.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/bun.js/log-test.test.ts b/test/bun.js/log-test.test.ts index 62098d97c..29f541e32 100644 --- a/test/bun.js/log-test.test.ts +++ b/test/bun.js/log-test.test.ts @@ -3,6 +3,7 @@ import { basename, dirname, join } from "path"; import * as fs from "fs"; import { readableStreamToText, spawnSync } from "bun"; import { bunExe } from "bunExe"; +import { bunEnv } from "bunEnv"; it("should not log .env when quiet", async () => { writeDirectoryTree("/tmp/log-test-silent", { @@ -13,9 +14,7 @@ it("should not log .env when quiet", async () => { const { stderr } = spawnSync({ cmd: [bunExe(), "index.ts"], cwd: "/tmp/log-test-silent", - env: { - BUN_DEBUG_QUIET_LOGS: "1", - }, + env: bunEnv, }); expect(stderr!.toString()).toBe(""); @@ -31,9 +30,7 @@ it("should log .env by default", async () => { const { stderr } = spawnSync({ cmd: [bunExe(), "index.ts"], cwd: "/tmp/log-test-silent", - env: { - BUN_DEBUG_QUIET_LOGS: "1", - }, + env: bunEnv, }); expect(stderr?.toString().includes(".env")).toBe(true); |
