Skip to content

Commit

Permalink
fix: attempt to prevent potential race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Carniato committed Dec 14, 2021
1 parent 117b347 commit ec72165
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/__tests__/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ async function waitForPendingRequests(page: playwright.Page, step: Step) {
const addOne = () => remaining++;
const finishOne = async () => {
// wait a tick to see if new requests start from this one.
await new Promise(resolve => setTimeout(resolve, 1000));
await page.evaluate(() => {});
if (!--remaining) resolve();
};
Expand Down

0 comments on commit ec72165

Please sign in to comment.