Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

chore: cleanup references of --opts (#5402)

Samuel Henrique1096b376c3c3
diff --git a/.wallaby.js b/.wallaby.js
index 62573c2f..9d5d4bf5 100644
--- a/.wallaby.js
+++ b/.wallaby.js
@@ -16,7 +16,6 @@ module.exports = () => {
instrument: false
},
'package.json',
- 'test/opts/mocha.opts',
'mocharc.yml',
'!lib/browser/growl.js'
],
diff --git a/lib/cli/run.js b/lib/cli/run.js
index 561592b9..73a98325 100644
--- a/lib/cli/run.js
+++ b/lib/cli/run.js
@@ -169,11 +169,15 @@ exports.builder = yargs =>
group: GROUPS.RULES
},
'list-interfaces': {
- conflicts: Array.from(ONE_AND_DONE_ARGS).filter(arg => arg !== "list-interfaces"),
+ conflicts: Array.from(ONE_AND_DONE_ARGS).filter(
+ arg => arg !== 'list-interfaces'
+ ),
description: 'List built-in user interfaces & exit'
},
'list-reporters': {
- conflicts: Array.from(ONE_AND_DONE_ARGS).filter(arg => arg !== "list-reporters"),
+ conflicts: Array.from(ONE_AND_DONE_ARGS).filter(
+ arg => arg !== 'list-reporters'
+ ),
description: 'List built-in reporters & exit'
},
'no-colors': {
@@ -196,7 +200,8 @@ exports.builder = yargs =>
group: GROUPS.RULES
},
'posix-exit-codes': {
- description: 'Use POSIX and UNIX shell exit codes as Mocha\'s return value',
+ description:
+ "Use POSIX and UNIX shell exit codes as Mocha's return value",
group: GROUPS.RULES
},
recursive: {
@@ -342,13 +347,6 @@ 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.`
- );
- }
-
return true;
})
.middleware(async (argv, yargs) => {
diff --git a/test/integration/options/opts.spec.js b/test/integration/options/opts.spec.js
deleted file mode 100644
index d66db406..00000000
--- a/test/integration/options/opts.spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-var invokeMocha = require('../helpers').invokeMocha;
-
-describe('--opts', function () {
- it('should report deprecation', function (done) {
- invokeMocha(
- ['--opts', './test/mocha.opts'],
- function (err, res) {
- if (err) {
- return done(err);
- }
- expect(
- res,
- 'to have failed with output',
- /'mocha.opts' is DEPRECATED/i
- );
- done();
- },
- 'pipe'
- );
- });
-});