Skip to content

Commit

Permalink
test: always activate colors if necessary
Browse files Browse the repository at this point in the history
PR-URL: #26264
Refs: #26261
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
BridgeAR committed Mar 4, 2019
1 parent 846cba0 commit 91b6145
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/pseudo-tty/test-assert-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const assert = require('assert').strict;
try {
// Activate colors even if the tty does not support colors.
process.env.COLORTERM = '1';
// Make sure TERM is not set to e.g., 'dumb' and NODE_DISABLE_COLORS is not
// active.
process.env.TERM = 'FOOBAR';
delete process.env.NODE_DISABLE_COLORS;
assert.deepStrictEqual([1, 2, 2, 2], [2, 2, 2, 2]);
} catch (err) {
const expected = 'Expected values to be strictly deep-equal:\n' +
Expand Down

0 comments on commit 91b6145

Please sign in to comment.