From 0e9d8ad59a78a482d97f4fe735dafa1f65dc89d2 Mon Sep 17 00:00:00 2001 From: Dmitrii Sorin Date: Sat, 20 Jul 2019 18:18:26 +1000 Subject: [PATCH] tty.getWindowSize is not a function inside a "worker_threads" worker (#3955) Use "isTTY" instead of tty.isatty(fd) --- lib/reporters/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reporters/base.js b/lib/reporters/base.js index 670a160fa8..b1d026fcce 100644 --- a/lib/reporters/base.js +++ b/lib/reporters/base.js @@ -25,7 +25,7 @@ exports = module.exports = Base; * Check if both stdio streams are associated with a tty. */ -var isatty = tty.isatty(1) && tty.isatty(2); +var isatty = process.stdout.isTTY && process.stderr.isTTY; /** * Save log references to avoid tests interfering (see GH-3604).