租房小程序前端代码
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.

17 lines
312 B

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