☕️ Classic, reliable, trusted test framework for Node.js and the browser
fix window width problem; closes #4393
Christopher Hiller962c81644a52
diff --git a/lib/reporters/base.js b/lib/reporters/base.jsindex 7d9e01c0..1f97e319 100644--- a/lib/reporters/base.js+++ b/lib/reporters/base.js@@ -14,7 +14,7 @@ var constants = require('../runner').constants;var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;-var isBrowser = require('../utils').isBrowser;+const isBrowser = utils.isBrowser();function getBrowserWindowSize() {if ('innerHeight' in global) {@@ -34,7 +34,7 @@ exports = module.exports = Base;* Check if both stdio streams are associated with a tty.*/-var isatty = isBrowser ? true : process.stdout.isTTY && process.stderr.isTTY;+var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);/*** Save log references to avoid tests interfering (see GH-3604).@@ -46,7 +46,7 @@ var consoleLog = console.log;*/exports.useColors =- !utils.isBrowser() &&+ !isBrowser &&(supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);/**