Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix window width problem; closes #4393 #4394

Merged
merged 1 commit into from Aug 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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