projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
a57dc84e96c0bf9cd99b857a3aa65f97d83f3d8e
[platform/framework/web/crosswalk-tizen.git]
/
1
var optimist = require('../');
2
var test = require('tap').test;
3
4
test('parse with modifier functions' , function (t) {
5
t.plan(1);
6
7
var argv = optimist().boolean('b').parse([ '-b', '123' ]);
8
t.deepEqual(fix(argv), { b: true, _: ['123'] });
9
});
10
11
function fix (obj) {
12
delete obj.$0;
13
return obj;
14
}