mocha 11.0.2 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli/cli.js CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  const debug = require('debug')('mocha:cli:cli');
14
14
  const symbols = require('log-symbols');
15
- const yargs = require('yargs/yargs');
15
+ const yargs = require('yargs');
16
16
  const path = require('path');
17
17
  const {
18
18
  loadRc,
@@ -63,7 +63,7 @@ exports.main = (argv = process.argv.slice(2), mochaArgs) => {
63
63
  debug('caught error sometime before command handler: %O', err);
64
64
  yargs.showHelp();
65
65
  console.error(`\n${symbols.error} ${ansi.red('ERROR:')} ${msg}`);
66
- process.exitCode = 1;
66
+ process.exit(1);
67
67
  })
68
68
  .help('help', 'Show usage information & exit')
69
69
  .alias('help', 'h')
@@ -71,7 +71,7 @@ exports.main = (argv = process.argv.slice(2), mochaArgs) => {
71
71
  .alias('version', 'V')
72
72
  .wrap(process.stdout.columns ? Math.min(process.stdout.columns, 80) : 80)
73
73
  .epilog(
74
- `Mocha Resources
74
+ `${ansi.reset("Mocha Resources")}
75
75
  Chat: ${ansi.magenta(discord)}
76
76
  GitHub: ${ansi.blue(repository.url)}
77
77
  Docs: ${ansi.yellow(homepage)}
package/lib/cli/run.js CHANGED
@@ -169,11 +169,11 @@ exports.builder = yargs =>
169
169
  group: GROUPS.RULES
170
170
  },
171
171
  'list-interfaces': {
172
- conflicts: Array.from(ONE_AND_DONE_ARGS),
172
+ conflicts: Array.from(ONE_AND_DONE_ARGS).filter(arg => arg !== "list-interfaces"),
173
173
  description: 'List built-in user interfaces & exit'
174
174
  },
175
175
  'list-reporters': {
176
- conflicts: Array.from(ONE_AND_DONE_ARGS),
176
+ conflicts: Array.from(ONE_AND_DONE_ARGS).filter(arg => arg !== "list-reporters"),
177
177
  description: 'List built-in reporters & exit'
178
178
  },
179
179
  'no-colors': {
package/lib/mocha.js CHANGED
@@ -194,7 +194,9 @@ function Mocha(options = {}) {
194
194
  .ui(options.ui)
195
195
  .reporter(
196
196
  options.reporter,
197
- options.reporterOption || options.reporterOptions // for backwards compatibility
197
+ options['reporter-option'] ||
198
+ options.reporterOption ||
199
+ options.reporterOptions // for backwards compatibility
198
200
  )
199
201
  .slow(options.slow)
200
202
  .global(options.global);
package/mocha.js CHANGED
@@ -1,4 +1,4 @@
1
- // mocha@11.0.2 in javascript ES2018
1
+ // mocha@11.1.0 in javascript ES2018
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -19208,7 +19208,7 @@
19208
19208
  };
19209
19209
 
19210
19210
  var name = "mocha";
19211
- var version = "11.0.2";
19211
+ var version = "11.1.0";
19212
19212
  var homepage = "https://mochajs.org/";
19213
19213
  var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
19214
19214
  var require$$17 = {
@@ -19414,7 +19414,9 @@
19414
19414
  .ui(options.ui)
19415
19415
  .reporter(
19416
19416
  options.reporter,
19417
- options.reporterOption || options.reporterOptions // for backwards compatibility
19417
+ options['reporter-option'] ||
19418
+ options.reporterOption ||
19419
+ options.reporterOptions // for backwards compatibility
19418
19420
  )
19419
19421
  .slow(options.slow)
19420
19422
  .global(options.global);