From 604d842512c26b57dd9f6ecc02e328d0f8601578 Mon Sep 17 00:00:00 2001 From: juergba Date: Sun, 21 Jul 2019 09:53:11 +0200 Subject: [PATCH] soft deprecate configuration via mocha.opts --- lib/cli/options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cli/options.js b/lib/cli/options.js index a88dbfbf17..c7b73ff59d 100644 --- a/lib/cli/options.js +++ b/lib/cli/options.js @@ -230,6 +230,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`); }