Skip to content

Commit 962c816

Browse files
committed
fix window width problem; closes #4393
looks like maybe a bad merge, but `isBrowser()` was used incorrectly
1 parent 7e250ef commit 962c816

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/reporters/base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var constants = require('../runner').constants;
1414
var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
1515
var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
1616

17-
var isBrowser = require('../utils').isBrowser;
17+
const isBrowser = utils.isBrowser();
1818

1919
function getBrowserWindowSize() {
2020
if ('innerHeight' in global) {
@@ -34,7 +34,7 @@ exports = module.exports = Base;
3434
* Check if both stdio streams are associated with a tty.
3535
*/
3636

37-
var isatty = isBrowser ? true : process.stdout.isTTY && process.stderr.isTTY;
37+
var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);
3838

3939
/**
4040
* Save log references to avoid tests interfering (see GH-3604).
@@ -46,7 +46,7 @@ var consoleLog = console.log;
4646
*/
4747

4848
exports.useColors =
49-
!utils.isBrowser() &&
49+
!isBrowser &&
5050
(supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);
5151

5252
/**

0 commit comments

Comments
 (0)