Files
bun.sh/test/js/bun/shell/shell-immediate-exit-fixture.js
2025-03-20 11:36:43 -07:00

18 lines
365 B
JavaScript
Generated

import { $, which } from "bun";
const cat = which("cat");
const promises = [];
for (let j = 0; j < 500; j++) {
for (let i = 0; i < 100; i++) {
promises.push($`${cat} ${import.meta.path}`.text().then(() => {}));
}
if (j % 10 === 0) {
await Promise.all(promises);
promises.length = 0;
console.count("Ran");
}
}
await Promise.all(promises);