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

cli: correctly parse screenEmulation boolean flags #12250

Merged
merged 1 commit into from
Mar 17, 2021
Merged

Conversation

brendankenny
Copy link
Member

fixes #12246

Unlike anything that looks like a number, things that look like a boolean aren't automatically parsed as one unless set specifically. Setting the type on nested properties is still kind of janky in yargs, so it's easier to handle in the coerce callback.

Also

  • adds tests for parsing of all the screenEmulation properties
  • adds a new option in cli-flags so that failure conditions can be tested without yargs logging the errors and calling process.exit(). We should have more CLI flag parsing tests, and this should help make that easier.

@brendankenny brendankenny requested a review from a team as a code owner March 16, 2021 02:27
@brendankenny brendankenny requested review from paulirish and removed request for a team March 16, 2021 02:27
@google-cla google-cla bot added the cla: yes label Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

screenEmulation.mobile errors with must be boolean when provided with a boolean
4 participants