1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/minimist/test/stop_early.js

18 lines
312 B
JavaScript
Raw Normal View History

2023-12-28 23:41:32 +08:00
'use strict';
2023-12-18 13:12:25 +08:00
var parse = require('../');
var test = require('tape');
test('stops parsing on the first non-option when stopEarly is set', function (t) {
2023-12-28 23:41:32 +08:00
var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
stopEarly: true,
});
2023-12-18 13:12:25 +08:00
2023-12-28 23:41:32 +08:00
t.deepEqual(argv, {
aaa: 'bbb',
_: ['ccc', '--ddd'],
});
2023-12-18 13:12:25 +08:00
2023-12-28 23:41:32 +08:00
t.end();
2023-12-18 13:12:25 +08:00
});