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
add config lookup for .implies() #556
Conversation
@@ -57,6 +57,23 @@ describe('validation tests', function () { | |||
}) | |||
.argv | |||
}) | |||
|
|||
it('should ignore the --no- part if boolean negation is disabled', function (done) { |
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.
If the test isn't async, you can just not accept done
as an argument, and then drop the line:
return done()
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.
rather than:
it('should ignore the --no- part if boolean negation is disabled')
I might put:
it('does not treat --no- as a special case, if boolean negation is disabled')
,
Had to read the current test description a few times, I might just be nit-picking though :)
@maxrimue this is looking quite clean, great work \o/ really curious as to why you're not able to get the test to fail! I'm sure it will be something silly. |
@bcoe So the only problem left now is to change the configuration in the test that I've created to |
@@ -219,6 +219,12 @@ module.exports = function (yargs, usage, y18n) { | |||
const implyFail = [] | |||
|
|||
Object.keys(implied).forEach(function (key) { | |||
let booleanNegation |
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.
this doesn't work in older versions of Node.js, so you'll want to use var.
@maxrimue turning on and off yargs' parsing options is not handled with the
for your test, rather than using
^ by doing this, it should load the |
@bcoe Had to change a line to make the |
@maxrimue give this a spin:
|
This will eventually fix #547
This PR is still a WIP as the new added test passes regardless of whether
boolean-negation
is turned on or off, however, I'd love to hear what folks think about the general approach already.