Skip to content

Commit

Permalink
soft deprecate configuration via mocha.opts
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Aug 19, 2019
1 parent a3644c6 commit b85ef0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/cli/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ const loadMochaOpts = (args = {}) => {
// if there's an exception to catch here, I'm not sure what it is.
// by attaching the `no-opts` arg, we avoid re-parsing of `mocha.opts`.
if (mochaOpts) {
deprecate(
'Configuration via mocha.opts is DEPRECATED and will be removed from a future version of Mocha. Use RC files or package.json instead.'
);
result = parse(parseMochaOpts(mochaOpts));
debug(`${filepath} parsed succesfully`);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ exports.builder = yargs =>
},
opts: {
default: defaults.opts,
description: 'Path to `mocha.opts`',
description: 'Path to `mocha.opts` (DEPRECATED)',
group: GROUPS.CONFIG,
normalize: true,
requiresArg: true
Expand Down

0 comments on commit b85ef0c

Please sign in to comment.