From f6714e43452b92ef4a4efa54efa2a7fc69ec4cfd Mon Sep 17 00:00:00 2001 From: Dmitrii Sorin Date: Sat, 22 Jun 2019 22:25:46 +1000 Subject: [PATCH 1/2] 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..176bb9c88c 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 = Boolean(process.stdout.isTTY) && Boolean(process.stderr.isTTY); /** * Save log references to avoid tests interfering (see GH-3604). From b4a9938b5e389ef4607eca96ea4aa6e0c63bb95c Mon Sep 17 00:00:00 2001 From: Dmitrii Sorin Date: Sat, 20 Jul 2019 17:56:05 +1000 Subject: [PATCH 2/2] Remove Boolean() --- 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 176bb9c88c..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 = Boolean(process.stdout.isTTY) && Boolean(process.stderr.isTTY); +var isatty = process.stdout.isTTY && process.stderr.isTTY; /** * Save log references to avoid tests interfering (see GH-3604).