Skip to content

Commit

Permalink
chore(test): fix config definitions test when run without tap
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 15, 2022
1 parent 9f57404 commit 4ca858c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit 4ca858c

Please sign in to comment.