Skip to content

Commit

Permalink
fix(firefox): unskip worker error test (#2805)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Jul 2, 2020
1 parent e12e245 commit 0d16b16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
{
"name": "firefox",
"revision": "1117"
"revision": "1118"
},
{
"name": "webkit",
Expand Down
11 changes: 8 additions & 3 deletions test/workers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ describe('Workers', function() {
const worker = await workerCreatedPromise;
expect(await worker.evaluate('1+1')).toBe(2);
});
it.fail(FFOX)('should report errors', async function({page}) {
// Times out after the 4/15/2020 roll.
it('should report errors', async function({page}) {
const errorPromise = new Promise(x => page.on('pageerror', x));
page.evaluate(() => new Worker(URL.createObjectURL(new Blob([`setTimeout(() => { throw new Error('this is my error'); })`], {type: 'application/javascript'}))));
page.evaluate(() => new Worker(URL.createObjectURL(new Blob([`
setTimeout(() => {
// Do a console.log just to check that we do not confuse it with an error.
console.log('hey');
throw new Error('this is my error');
})
`], {type: 'application/javascript'}))));
const errorLog = await errorPromise;
expect(errorLog.message).toContain('this is my error');
});
Expand Down

0 comments on commit 0d16b16

Please sign in to comment.