test(cli): isolate Bun define cache (#46536)

Co-authored-by: rekram1-node <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-08-31 23:01:02 -05:00
committed by GitHub
Unverified
parent 1137861188
commit 23fde448ec
+7 -1
View File
@@ -198,7 +198,13 @@ test("Node distribution honors the compile-time CLI name", async () => {
"--test-name-pattern",
"^Node distribution resolves the published npm package$",
],
{ cwd: path.join(import.meta.dir, ".."), stdout: "ignore", stderr: "pipe" },
{
cwd: path.join(import.meta.dir, ".."),
stdout: "ignore",
stderr: "pipe",
// Bun 1.4 can reuse cached modules compiled with different --define values.
env: { ...process.env, BUN_RUNTIME_TRANSPILER_CACHE_PATH: "0" },
},
)
const [code, stderr] = await Promise.all([child.exited, new Response(child.stderr).text()])
expect(code, stderr).toBe(0)