aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-20 21:45:05 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-20 21:45:05 -0700
commitcd49615e2cee905fc837820db1c07aed472a92ad (patch)
treed5abaaf32bfdb17df3b2c3f4df4cf86f72fe563b
parenteb37794a3b2f4ad8b3dd895d1402b5bb538790a1 (diff)
downloadbun-cd49615e2cee905fc837820db1c07aed472a92ad.tar.gz
bun-cd49615e2cee905fc837820db1c07aed472a92ad.tar.zst
bun-cd49615e2cee905fc837820db1c07aed472a92ad.zip
fix flaky test
@paperdave we must always use `bunEnv` in the `env` to ensure that the color settings and other stuff doesn't cause bun to produce extraneous stdout input when using console.log Additionally, the console.log was left in (which is okay)
-rw-r--r--test/regression/issue/03216.test.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/regression/issue/03216.test.ts b/test/regression/issue/03216.test.ts
index fd4f391d0..5eced0bf9 100644
--- a/test/regression/issue/03216.test.ts
+++ b/test/regression/issue/03216.test.ts
@@ -3,7 +3,7 @@ import { test, expect } from "bun:test";
import { tmpdir } from "os";
import { mkdtempSync, writeFileSync } from "fs";
import { join } from "path";
-import { bunExe } from "harness";
+import { bunEnv, bunExe } from "harness";
test("runtime directory caching gets invalidated", () => {
const tmp = mkdtempSync(join(tmpdir(), "bun-test-"));
@@ -33,10 +33,9 @@ try {
const result = Bun.spawnSync({
cmd: [bunExe(), "run", join(tmp, "index.ts")],
cwd: tmp,
+ env: bunEnv,
});
- console.log(bunExe(), join(tmp, "index.ts"), result.stdout.toString("utf-8"));
-
expect(result.exitCode).toBe(0);
expect(result.stdout.toString("utf-8")).toBe("1\n");
});