Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix workers test #3527

Merged
merged 2 commits into from Nov 10, 2018
Merged

Conversation

aslushnikov
Copy link
Contributor

No description provided.

@@ -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(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense to me. Isn't it the opposite of what the test is testing for? EMPTY_PAGE shouldn't have any workers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I meant 0.

@@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. Whats the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this test fails, the output is cryptic since Worker object is not nicely serializable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair

@aslushnikov aslushnikov merged commit 27ea226 into puppeteer:master Nov 10, 2018
@aslushnikov aslushnikov deleted the test-workers branch January 22, 2019 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants