test: always activate colors if necessary
PR-URL: https://github.com/nodejs/node/pull/26264 Refs: https://github.com/nodejs/node/pull/26261 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
d773311c33
commit
7f2d2cdc0c
@ -5,6 +5,10 @@ const assert = require('assert').strict;
|
|||||||
try {
|
try {
|
||||||
// Activate colors even if the tty does not support colors.
|
// Activate colors even if the tty does not support colors.
|
||||||
process.env.COLORTERM = '1';
|
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]);
|
assert.deepStrictEqual([1, 2, 2, 2], [2, 2, 2, 2]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const expected = 'Expected values to be strictly deep-equal:\n' +
|
const expected = 'Expected values to be strictly deep-equal:\n' +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user