You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stop_early.js 328B

123456789101112131415
  1. var parse = require('../');
  2. var test = require('tape');
  3. test('stops parsing on the first non-option when stopEarly is set', function (t) {
  4. var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
  5. stopEarly: true
  6. });
  7. t.deepEqual(argv, {
  8. aaa: 'bbb',
  9. _: ['ccc', '--ddd']
  10. });
  11. t.end();
  12. });