mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: fix workers test (#3527)
This commit is contained in:
parent
d3f50ea425
commit
27ea226bbc
@ -15,7 +15,7 @@ module.exports.addTests = function({testRunner, expect}) {
|
|||||||
expect(await worker.evaluate(() => self.workerFunction())).toBe('worker function result');
|
expect(await worker.evaluate(() => self.workerFunction())).toBe('worker function result');
|
||||||
|
|
||||||
await page.goto(server.EMPTY_PAGE);
|
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}) {
|
it('should emit created and destroyed events', async function({page}) {
|
||||||
const workerCreatedPromise = new Promise(x => page.once('workercreated', x));
|
const workerCreatedPromise = new Promise(x => page.once('workercreated', x));
|
||||||
|
Loading…
Reference in New Issue
Block a user