mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
move to .test.js file and make one test
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user