Skip to content

Commit

Permalink
fix window width problem; closes #4393
Browse files Browse the repository at this point in the history
looks like maybe a bad merge, but `isBrowser()` was used incorrectly
  • Loading branch information
boneskull committed Aug 4, 2020
1 parent 7e250ef commit 962c816
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/reporters/base.js
Expand Up @@ -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) {
Expand All @@ -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).
Expand All @@ -46,7 +46,7 @@ var consoleLog = console.log;
*/

exports.useColors =
!utils.isBrowser() &&
!isBrowser &&
(supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);

/**
Expand Down

0 comments on commit 962c816

Please sign in to comment.