Skip to content

Commit

Permalink
throw when opts is used
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Feb 8, 2020
1 parent dcc255b commit 0c21c42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ exports.builder = yargs =>
);
}

if (argv.opts) {
throw createUnsupportedError(
`--opts: configuring Mocha via 'mocha.opts' is DEPRECATED and no longer supported.
Please use a configuration file instead.`
);
}

// load requires first, because it can impact "plugin" validation
handleRequires(argv.require);
validatePlugin(argv, 'reporter', Mocha.reporters);
Expand Down

0 comments on commit 0c21c42

Please sign in to comment.