Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno authored and substack committed Mar 10, 2020
1 parent ac3fc79 commit 6be5dae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/bool.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,15 @@ test('boolean --boool=false', function (t) {
t.same(parsed.boool, false);
t.end();
});

test('boolean using something similar to true', function (t) {
var opts = { boolean: 'h' };
var result = parse(['-h', 'true.txt'], opts);
var expected = {
h: true,
'_': ['true.txt']
};

t.same(result, expected);
t.end();
});

0 comments on commit 6be5dae

Please sign in to comment.