Skip to content

Commit

Permalink
Increase timeout for flaky test to make it less flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed Jul 29, 2024
1 parent 7e43f27 commit eadd026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/wait-for.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ test(
await utils.runJS(`
setTimeout(() => {
document.write('<h2>Hi</h2>')
}, 100)
}, 500)
`);
// At first the element should not be there
// Because it waits 100ms to add it
// Because it waits 500ms to add it
expect(await page.$('h2')).toBeNull();
const waitForCallback = jest.fn(async () => {
expect(await page.$('h2')).not.toBeNull();
Expand Down

0 comments on commit eadd026

Please sign in to comment.