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

fix: throw from eval methods if >1 argument is passed #2043

Merged
merged 3 commits into from
Apr 30, 2020

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Apr 30, 2020

For typescript clients the compiler will catch the issue but for js clients it could be frustrating like in #2030.

await f().catch(e => error = e);
expect('' + error).toContain('Too many arguments');
}
expectThrow(() => page.evaluate((a, b) => false, 1, 2));
Copy link
Contributor

Choose a reason for hiding this comment

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

you probably want to await all of these

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch!

@yury-s yury-s merged commit 5993a6a into microsoft:master Apr 30, 2020
@yury-s yury-s deleted the too-many-args branch April 30, 2020 01:35
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.

2 participants