Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2022-04-15 01:44:57 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-04-15 19:51:09 +0300
commit4ca858c4e210781f369c4403e711dbbbbe5aaca6 (patch)
tree0af5896ec944064a54acf3cab954e435e3fb50cf /test
parent9f57404dc148835d7393b5fe617c8c5e2c958061 (diff)
chore(test): fix config definitions test when run without tap
Diffstat (limited to 'test')
-rw-r--r--test/lib/utils/config/definitions.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js
index b387835df..088d0cdb6 100644
--- a/test/lib/utils/config/definitions.js
+++ b/test/lib/utils/config/definitions.js
@@ -375,6 +375,8 @@ t.test('color', t => {
t.strictSame(flat, { color: false, logColor: false }, 'true when --no-color')
setTTY('stdout', false)
+ setTTY('stderr', false)
+
obj.color = true
definitions.color.flatten('color', obj, flat)
t.strictSame(flat, { color: false, logColor: false }, 'no color when stdout not tty')
@@ -383,7 +385,6 @@ t.test('color', t => {
t.strictSame(flat, { color: true, logColor: false }, '--color turns on color when stdout is tty')
setTTY('stdout', false)
- setTTY('stderr', false)
obj.color = true
definitions.color.flatten('color', obj, flat)
t.strictSame(flat, { color: false, logColor: false }, 'no color when stderr not tty')