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

_mocha: Allow boolean --reporter-options #1754

Merged

Conversation

papandreou
Copy link
Contributor

Previously "mocha --reporter-options foo" would blow up because an equal sign is required. This is quite unhandy for reporters that need to accept boolean (flag-ish) options.

This commit changes that so that a value-less reporter option will be interpreted as having a value of true.

This means that --reporter-options foo=bar,quux will turn into { foo: 'bar', quux: true }

Previously "mocha --reporter-options foo" would blow up because an equal sign is required. This is quite unhandy for reporters that need to accept boolean (flag-ish) options.

This commit changes that so that a value-less reporter option will be interpreted as having a value of true.

This means that --reporter-options foo=bar,quux will turn into { foo: 'bar', quux: true }
@jbnicolai jbnicolai force-pushed the master branch 3 times, most recently from 2f458ab to 2952eca Compare July 5, 2015 10:25
@jbnicolai
Copy link

Am I correct in understanding that this is a non-breaking change?

Looks good :)

Edit: played with it a bit, clearly non-breaking. Thanks for the effort, @papandreou

@jbnicolai jbnicolai merged commit 6379414 into mochajs:master Jul 5, 2015
@papandreou
Copy link
Contributor Author

Yes, you are correct -- and thanks :)

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