test: fix workers test (#3527)

This commit is contained in:
Andrey Lushnikov 2018-11-09 18:44:53 -08:00 committed by GitHub
parent d3f50ea425
commit 27ea226bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ module.exports.addTests = function({testRunner, expect}) {
expect(await worker.evaluate(() => self.workerFunction())).toBe('worker function result');
await page.goto(server.EMPTY_PAGE);
expect(page.workers()).toEqual([]);
expect(page.workers().length).toBe(0);
});
it('should emit created and destroyed events', async function({page}) {
const workerCreatedPromise = new Promise(x => page.once('workercreated', x));
@ -55,4 +55,4 @@ module.exports.addTests = function({testRunner, expect}) {
expect(errorLog.message).toContain('this is my error');
});
});
};
};