Files
react-native-devtools-frontend/node_modules/minimist/test/long.js
T
Tim van der Lippe e8c1000fcd Update karma-mocha
Required for https://npmjs.com/advisories/1179

The breaking change in 2.0.0 is to drop Node 8 [1], which we don't use.

[1]: https://github.com/karma-runner/karma-mocha/releases/tag/v2.0.0

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Change-Id: If4aa30d0db598fbd27e0d194271391f3b840dabd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2193576
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-11 15:05:14 +00:00

32 lines
779 B
JavaScript

var test = require('tape');
var parse = require('../');
test('long opts', function (t) {
t.deepEqual(
parse([ '--bool' ]),
{ bool : true, _ : [] },
'long boolean'
);
t.deepEqual(
parse([ '--pow', 'xixxle' ]),
{ pow : 'xixxle', _ : [] },
'long capture sp'
);
t.deepEqual(
parse([ '--pow=xixxle' ]),
{ pow : 'xixxle', _ : [] },
'long capture eq'
);
t.deepEqual(
parse([ '--host', 'localhost', '--port', '555' ]),
{ host : 'localhost', port : 555, _ : [] },
'long captures sp'
);
t.deepEqual(
parse([ '--host=localhost', '--port=555' ]),
{ host : 'localhost', port : 555, _ : [] },
'long captures eq'
);
t.end();
});