PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/minimist/test/default_bool.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 20 lines | 18 code | 2 blank | 0 comment | 0 complexity | c3598075b51486aa545526d13b454c66 MD5 | raw file
 1var test = require('tape');
 2var parse = require('../');
 3
 4test('boolean default true', function (t) {
 5    var argv = parse([], {
 6        boolean: 'sometrue',
 7        default: { sometrue: true }
 8    });
 9    t.equal(argv.sometrue, true);
10    t.end();
11});
12
13test('boolean default false', function (t) {
14    var argv = parse([], {
15        boolean: 'somefalse',
16        default: { somefalse: false }
17    });
18    t.equal(argv.somefalse, false);
19    t.end();
20});