Skip to content

Commit bc6511a

Browse files
MoLowRafaelGSS
authored andcommitted
test_runner: color errors only when colors are available
PR-URL: #47394 Fixes: #47393 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 463361e commit bc6511a

File tree

1 file changed

+2
-2
lines changed
  • lib/internal/test_runner/reporter

1 file changed

+2
-2
lines changed

lib/internal/test_runner/reporter/spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const {
1414
const assert = require('assert');
1515
const Transform = require('internal/streams/transform');
1616
const { inspectWithNoCustomRetry } = require('internal/errors');
17-
const { green, blue, red, white, gray } = require('internal/util/colors');
17+
const { green, blue, red, white, gray, hasColors } = require('internal/util/colors');
1818
const { getCoverageReport } = require('internal/test_runner/utils');
1919

20-
const inspectOptions = { __proto__: null, colors: true, breakLength: Infinity };
20+
const inspectOptions = { __proto__: null, colors: hasColors, breakLength: Infinity };
2121

2222
const colors = {
2323
'__proto__': null,

0 commit comments

Comments
 (0)