projects
/
VSoRC
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Websocket
[VSoRC/.git]
/
node_modules
/
node-static
/
node_modules
/
optimist
/
test
/
parse_modified.js
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
}