Skip to content

Commit

Permalink
test(nonStallingRawEvaluateInExistingMainContext): fix broken test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelEinbinder authored Jun 4, 2021
1 parent 21b00d0 commit e37c078
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/page/page-evaluate-no-stall.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ test.describe('non-stalling evaluate', () => {
});
await page.setContent('<iframe></iframe>');
const error = await errorPromise;
// bail out if we accidentally succeeded
if (error === 4)
return;
// Testing this as a race.
const success = error.message === 'Frame does not yet have a main execution context' || 'Frame is currently attempting a navigation';
const success = error.message === 'Frame does not yet have a main execution context' || error.message === 'Frame is currently attempting a navigation';
expect(success).toBeTruthy();
});
});

0 comments on commit e37c078

Please sign in to comment.