Skip to content

Commit

Permalink
chore: fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 29, 2022
1 parent c9099b4 commit 0c2d4a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/src/CDPSession.spec.ts
Expand Up @@ -64,7 +64,10 @@ describe('Target.createCDPSession', function () {
client.on('Network.requestWillBeSent', event => {
return events.push(event);
});
await page.goto(server.EMPTY_PAGE);
await Promise.all([
waitEvent(client, 'Network.requestWillBeSent'),
page.goto(server.EMPTY_PAGE),
]);
expect(events.length).toBe(1);
});
it('should enable and disable domains independently', async () => {
Expand Down

0 comments on commit 0c2d4a0

Please sign in to comment.