diff options
Diffstat (limited to 'desktop/node_modules/minimist/test/stop_early.js')
-rw-r--r-- | desktop/node_modules/minimist/test/stop_early.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/node_modules/minimist/test/stop_early.js b/desktop/node_modules/minimist/test/stop_early.js new file mode 100644 index 0000000..52a6a91 --- /dev/null +++ b/desktop/node_modules/minimist/test/stop_early.js @@ -0,0 +1,17 @@ +'use strict'; + +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true, + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'], + }); + + t.end(); +}); |