We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77058c6 commit c474a64Copy full SHA for c474a64
test/dash.js
@@ -2,7 +2,7 @@ var optimist = require('../index');
2
var test = require('tap').test;
3
4
test('-', function (t) {
5
- t.plan(3);
+ t.plan(5);
6
t.deepEqual(
7
fix(optimist.parse([ '-n', '-' ])),
8
{ n: '-', _: [] }
@@ -15,6 +15,14 @@ test('-', function (t) {
15
fix(optimist.parse([ '-f-' ])),
16
{ f: '-', _: [] }
17
);
18
+ t.deepEqual(
19
+ fix(optimist([ '-b', '-' ]).boolean('b').argv),
20
+ { b: true, _: [ '-' ] }
21
+ );
22
23
+ fix(optimist([ '-s', '-' ]).string('s').argv),
24
+ { s: '-', _: [] }
25
26
});
27
28
function fix (obj) {
0 commit comments