Skip to content

Commit

Permalink
test: fix flaky interception test (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Mar 24, 2020
1 parent b778789 commit 4f89e40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/interception.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,9 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p
spinner ? route.abort() : route.continue();
spinner = !spinner;
});
const results = await page.evaluate(() => Promise.all([
fetch('/zzz').then(response => response.text()).catch(e => 'FAILED'),
fetch('/zzz').then(response => response.text()).catch(e => 'FAILED'),
fetch('/zzz').then(response => response.text()).catch(e => 'FAILED'),
]));
const results = [];
for (let i = 0; i < 3; i++)
results.push(await page.evaluate(() => fetch('/zzz').then(response => response.text()).catch(e => 'FAILED')));
expect(results).toEqual(['11', 'FAILED', '22']);
});
it('should navigate to dataURL and not fire dataURL requests', async({page, server}) => {
Expand Down

0 comments on commit 4f89e40

Please sign in to comment.