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]>
BridgeAR committed Mar 3, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
charlyx Charles-Henri GUERIN
1 parent d773311 commit 7f2d2cd
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
@@ -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' +

0 comments on commit 7f2d2cd

Please sign in to comment.