From a2e2c91cfa2a7c41f1d77f3d015c804e5ee46c18 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Tue, 6 Nov 2018 16:04:08 -0500 Subject: [PATCH] test: disable color formating for test-internal-errors.js PR-URL: https://github.com/nodejs/node/pull/24204 Fixes: https://github.com/nodejs/node/issues/24193 Refs: https://github.com/nodejs/node/pull/19723 Reviewed-By: Rich Trott Reviewed-By: Ben Noordhuis --- test/parallel/test-internal-errors.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-internal-errors.js b/test/parallel/test-internal-errors.js index 7d5dcce0d40c6a..bf4688d89bd0ca 100644 --- a/test/parallel/test-internal-errors.js +++ b/test/parallel/test-internal-errors.js @@ -10,6 +10,10 @@ const { internalBinding } = require('internal/test/binding'); const assert = require('assert'); const errors = require('internal/errors'); +// Turn off ANSI color formatting for this test file. +const { inspect } = require('util'); +inspect.defaultOptions.colors = false; + errors.E('TEST_ERROR_1', 'Error for testing purposes: %s', Error, TypeError, RangeError); errors.E('TEST_ERROR_2', (a, b) => `${a} ${b}`, Error);