Skip to content

Commit e76a0df

Browse files
committed
fix(cli): handle extends setting properly
1 parent 72273cb commit e76a0df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/cli/config.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const fs = require('fs');
1111
const path = require('path');
1212
const debug = require('debug')('mocha:cli:config');
1313
const findUp = require('find-up');
14+
const yargs = require('yargs/yargs');
1415
const {createUnparsableFileError} = require('../errors');
1516
const utils = require('../utils');
1617

@@ -76,6 +77,10 @@ exports.loadConfig = filepath => {
7677
} else {
7778
config = parsers.json(filepath);
7879
}
80+
81+
config = yargs(undefined, path.dirname(filepath))
82+
.parserConfiguration(require('./options').YARGS_PARSER_CONFIG)
83+
.config(config);
7984
} catch (err) {
8085
throw createUnparsableFileError(
8186
`Unable to read/parse ${filepath}: ${err}`,

0 commit comments

Comments
 (0)