From 7f2d2cdc0cb45b8c97abf152b5cce6ec43aaaf79 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 28 Feb 2019 21:29:08 +0100 Subject: [PATCH] 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 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- test/pseudo-tty/test-assert-colors.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/pseudo-tty/test-assert-colors.js b/test/pseudo-tty/test-assert-colors.js index e843bcb218a078..76001bf786bb5d 100644 --- a/test/pseudo-tty/test-assert-colors.js +++ b/test/pseudo-tty/test-assert-colors.js @@ -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' +