@@ -11,7 +11,6 @@ const yargsParser = require('yargs-parser');
1111const { types, aliases} = require ( './run-option-metadata' ) ;
1212const { ONE_AND_DONE_ARGS } = require ( './one-and-dones' ) ;
1313const mocharc = require ( '../mocharc.json' ) ;
14- const yargsParserConfig = require ( '../../package.json' ) . yargs ;
1514const { list} = require ( './run-helpers' ) ;
1615const { loadConfig, findConfig} = require ( './config' ) ;
1716const findup = require ( 'findup-sync' ) ;
@@ -32,6 +31,16 @@ const {isNodeFlag} = require('./node-flags');
3231 * @interface Arguments
3332 */
3433
34+ /**
35+ * Base yargs parser configuration
36+ * @private
37+ */
38+ const YARGS_PARSER_CONFIG = {
39+ 'combine-arrays' : true ,
40+ 'short-option-groups' : false ,
41+ 'dot-notation' : false
42+ } ;
43+
3544/**
3645 * This is the config pulled from the `yargs` property of Mocha's
3746 * `package.json`, but it also disables camel case expansion as to
@@ -40,7 +49,7 @@ const {isNodeFlag} = require('./node-flags');
4049 * @private
4150 * @ignore
4251 */
43- const configuration = Object . assign ( { } , yargsParserConfig , {
52+ const configuration = Object . assign ( { } , YARGS_PARSER_CONFIG , {
4453 'camel-case-expansion' : false
4554} ) ;
4655
@@ -335,3 +344,4 @@ const loadOptions = (argv = []) => {
335344} ;
336345
337346module . exports . loadOptions = loadOptions ;
347+ module . exports . YARGS_PARSER_CONFIG = YARGS_PARSER_CONFIG ;
0 commit comments