mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
### What does this PR do? ### How did you verify your code works? --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
21 lines
417 B
JavaScript
Generated
21 lines
417 B
JavaScript
Generated
import { $, which } from "bun";
|
|
|
|
const cmd = which("true");
|
|
|
|
const promises = [];
|
|
|
|
const upperCount = process.platform === "darwin" ? 100 : 300;
|
|
|
|
for (let j = 0; j < upperCount; j++) {
|
|
for (let i = 0; i < 100; i++) {
|
|
promises.push($`${cmd}`.text().then(() => {}));
|
|
}
|
|
if (j % 10 === 0) {
|
|
await Promise.all(promises);
|
|
promises.length = 0;
|
|
console.count("Ran");
|
|
}
|
|
}
|
|
|
|
await Promise.all(promises);
|