source: trip-planner-front/node_modules/minimist/test/long.js@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 779 bytes
Line 
1var test = require('tape');
2var parse = require('../');
3
4test('long opts', function (t) {
5 t.deepEqual(
6 parse([ '--bool' ]),
7 { bool : true, _ : [] },
8 'long boolean'
9 );
10 t.deepEqual(
11 parse([ '--pow', 'xixxle' ]),
12 { pow : 'xixxle', _ : [] },
13 'long capture sp'
14 );
15 t.deepEqual(
16 parse([ '--pow=xixxle' ]),
17 { pow : 'xixxle', _ : [] },
18 'long capture eq'
19 );
20 t.deepEqual(
21 parse([ '--host', 'localhost', '--port', '555' ]),
22 { host : 'localhost', port : 555, _ : [] },
23 'long captures sp'
24 );
25 t.deepEqual(
26 parse([ '--host=localhost', '--port=555' ]),
27 { host : 'localhost', port : 555, _ : [] },
28 'long captures eq'
29 );
30 t.end();
31});
Note: See TracBrowser for help on using the repository browser.