mocha 8.1.0 → 8.1.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 8.1.1 / 2020-08-04
2
+
3
+ ## :bug: Fixes
4
+
5
+ - [#4394](https://github.com/mochajs/mocha/issues/4394): Fix regression wherein certain reporters did not correctly detect terminal width ([**@boneskull**](https://github.com/boneskull))
6
+
1
7
  # 8.1.0 / 2020-07-30
2
8
 
3
9
  In this release, Mocha now builds its browser bundle with Rollup and Babel, which will provide the project's codebase more flexibility and consistency.
@@ -14,7 +14,7 @@ var constants = require('../runner').constants;
14
14
  var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
15
15
  var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
16
16
 
17
- var isBrowser = require('../utils').isBrowser;
17
+ const isBrowser = utils.isBrowser();
18
18
 
19
19
  function getBrowserWindowSize() {
20
20
  if ('innerHeight' in global) {
@@ -34,7 +34,7 @@ exports = module.exports = Base;
34
34
  * Check if both stdio streams are associated with a tty.
35
35
  */
36
36
 
37
- var isatty = isBrowser ? true : process.stdout.isTTY && process.stderr.isTTY;
37
+ var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);
38
38
 
39
39
  /**
40
40
  * Save log references to avoid tests interfering (see GH-3604).
@@ -46,7 +46,7 @@ var consoleLog = console.log;
46
46
  */
47
47
 
48
48
  exports.useColors =
49
- !utils.isBrowser() &&
49
+ !isBrowser &&
50
50
  (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);
51
51
 
52
52
  /**
package/mocha.js CHANGED
@@ -20717,7 +20717,7 @@
20717
20717
  var constants = runner$1.constants;
20718
20718
  var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
20719
20719
  var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
20720
- var isBrowser = utils.isBrowser;
20720
+ var isBrowser = utils.isBrowser();
20721
20721
 
20722
20722
  function getBrowserWindowSize() {
20723
20723
  if ('innerHeight' in commonjsGlobal) {
@@ -20737,7 +20737,7 @@
20737
20737
  * Check if both stdio streams are associated with a tty.
20738
20738
  */
20739
20739
 
20740
- var isatty = isBrowser ? true : process$1.stdout.isTTY && process$1.stderr.isTTY;
20740
+ var isatty = isBrowser || process$1.stdout.isTTY && process$1.stderr.isTTY;
20741
20741
  /**
20742
20742
  * Save log references to avoid tests interfering (see GH-3604).
20743
20743
  */
@@ -20747,7 +20747,7 @@
20747
20747
  * Enable coloring by default, except in the browser interface.
20748
20748
  */
20749
20749
 
20750
- exports.useColors = !utils.isBrowser() && (require$$9.stdout || process$1.env.MOCHA_COLORS !== undefined);
20750
+ exports.useColors = !isBrowser && (require$$9.stdout || process$1.env.MOCHA_COLORS !== undefined);
20751
20751
  /**
20752
20752
  * Inline diffs instead of +/-
20753
20753
  */
@@ -23506,7 +23506,7 @@
23506
23506
  });
23507
23507
 
23508
23508
  var name = "mocha";
23509
- var version$2 = "8.1.0";
23509
+ var version$2 = "8.1.1";
23510
23510
  var homepage = "https://mochajs.org/";
23511
23511
  var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
23512
23512
  var _package = {