Skip to content

Commit 6be5dae

Browse files
joaomorenosubstack
authored and
substack
committedMar 10, 2020
add test
1 parent ac3fc79 commit 6be5dae

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎test/bool.js

+12
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,15 @@ test('boolean --boool=false', function (t) {
164164
t.same(parsed.boool, false);
165165
t.end();
166166
});
167+
168+
test('boolean using something similar to true', function (t) {
169+
var opts = { boolean: 'h' };
170+
var result = parse(['-h', 'true.txt'], opts);
171+
var expected = {
172+
h: true,
173+
'_': ['true.txt']
174+
};
175+
176+
t.same(result, expected);
177+
t.end();
178+
});

0 commit comments

Comments
 (0)
Please sign in to comment.