Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
After v6 it takes 1 more microtask before starting an execution, so used
`delay(0)` to wait instead.
  • Loading branch information
tuhm1 committed Jul 5, 2024
1 parent 9d61e10 commit 49311e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ test('change concurrency to smaller value', async t => {
--running;
}),
);
await Promise.resolve();
await delay(0);
t.is(running, 4);

limit.concurrency = 2;
Expand All @@ -210,7 +210,7 @@ test('change concurrency to bigger value', async t => {
--running;
}),
);
await Promise.resolve();
await delay(0);
t.is(running, 2);

limit.concurrency = 4;
Expand Down

0 comments on commit 49311e5

Please sign in to comment.