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
fixes tests #794
fixes tests #794
Conversation
index.js
Outdated
this.required = ~flags.indexOf('<'); | ||
this.optional = ~flags.indexOf('['); | ||
this.required = flags.indexOf('<') >= 0; | ||
this.optional = flags.indexOf('[') >= 0; | ||
this.bool = !~flags.indexOf('-no-'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also convert this line as you did with previous one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do it if you want, but it will only be for readability/consistency, as the result is boolean as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for consistency purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, it's done. :)
- Many tests were not properly invoking assertion functions. Now they are. - Fixed one test then was then failing because of side-effects from previous test setups. - Made small changes in some setups to avoid potential false negatives. (Also: made a tiny unrelated code change to ensure Options always has boolean properties; does not change any behavior, but may help with debugging.)
ca81722
to
679f897
Compare
Thanks |
previous test setups.
(Also: made a tiny unrelated code change to ensure Options always has
boolean properties; does not change any behavior, but may help with
debugging.)