Skip to content

Commit

Permalink
Deflake fs.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Aug 24, 2024
1 parent 078fdd3 commit b005ef4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/js/node/fs/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2376,14 +2376,13 @@ describe("fs/promises", () => {
}, 100000);

for (let withFileTypes of [false, true] as const) {
const warmup = 1;
const iterCount = 200;
const full = resolve(import.meta.dir, "../");

const doIt = async () => {
for (let i = 0; i < warmup; i++) {
await promises.readdir(full, { withFileTypes });
}
await Promise.all(
Array.from({ length: iterCount }, () => promises.readdir(full, { withFileTypes, recursive: true })),
);

const maxFD = getMaxFD();
const pending = new Array(iterCount);
Expand Down

0 comments on commit b005ef4

Please sign in to comment.