Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6be5dae

Browse filesBrowse files
joaomorenosubstack
authored and
substack
committed
add test
1 parent ac3fc79 commit 6be5dae
Copy full SHA for 6be5dae

File tree

1 file changed

+12
-0
lines changed
Filter options

1 file changed

+12
-0
lines changed

‎test/bool.js

Copy file name to clipboardExpand all lines: test/bool.js
+12Lines changed: 12 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.