diff --git a/lib/cli/run.js b/lib/cli/run.js index 94c7c991fb..cf56f3ac07 100644 --- a/lib/cli/run.js +++ b/lib/cli/run.js @@ -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);