-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved incorrect value assignments to boolean flags when succeeded …
…by an unnamed argument.
- Loading branch information
1 parent
f10c36d
commit 61938dc
Showing
3 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ test('Non-Boolean Regression Test', t => { | |
|
||
const Args = new Parser(input, cfg) | ||
const d = Args.data | ||
t.ok(d.more === true, 'Recognized boolean flag.') | ||
t.ok(d.t === true, 'Treat unrecognized flags separtely from boolean flag. Expected a flag called "t" to exist. Recognized: ' + d.hasOwnProperty('t')) | ||
t.expect(true, d.more, 'Recognized boolean flag.') | ||
t.expect(true, d.t, 'Treat unrecognized flags separtely from boolean flag. Expected a flag called "t" to exist. Recognized: ' + d.hasOwnProperty('t')) | ||
t.end() | ||
}) | ||
|
||
|
@@ -130,7 +130,7 @@ test('Boolean flags followed by unnamed string argument', t => { | |
t.expect('[email protected]', data.runtime, 'recognized string flag') | ||
t.expect(true, data.debugmodule, 'recognized first boolean flag') | ||
t.expect(true, data.verbose, 'recognized second boolean flag') | ||
t.ok(data['./tests/*-*.js'] !== undefined, 'recognized unnamed string argument') | ||
t.expect('./tests/*-*.js', data.unknown1, 'recognized unnamed string argument') | ||
|
||
t.end() | ||
}) |