move to .test.js file and make one test

This commit is contained in:
Meghan Denny
2024-07-31 23:39:14 -07:00
parent e331fea16a
commit b9fc52bf76

View File

@@ -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);