diff --git a/test/js/bun/spawn/spawn-stdin-regression.js b/test/js/bun/spawn/spawn-stdin-regression.test.js similarity index 81% rename from test/js/bun/spawn/spawn-stdin-regression.js rename to test/js/bun/spawn/spawn-stdin-regression.test.js index 003a0aa7ed..346f3c7c0e 100644 --- a/test/js/bun/spawn/spawn-stdin-regression.js +++ b/test/js/bun/spawn/spawn-stdin-regression.test.js @@ -1,13 +1,15 @@ +import { bunExe } from "harness"; + const jsc = require("bun:jsc"); -for (let i = 0; i < 30; i++) { - test(`this used to crash :: ${i}`, async () => { +test(`this used to crash`, async () => { + for (let i = 0; i < 30; i++) { const buffer = Buffer.alloc(1024 * 1024, "a"); async function getStdin() { { let subprocess = Bun.spawn({ - cmd: [process.argv0, "-e", "Bun.sleep(100)"], + cmd: [bunExe(), "-e", "Bun.sleep(100)"], stdio: ["pipe", "ignore", "ignore"], }); subprocess.unref(); @@ -27,5 +29,5 @@ for (let i = 0; i < 30; i++) { const { objectTypeCounts } = jsc.heapStats(); console.log("objectTypeCounts:", objectTypeCounts.FileSink, objectTypeCounts.Subprocess); console.log("RSS", (process.memoryUsage.rss() / 1024 / 1024) | 0, "MB"); - }); -} + } +}, 30_000);