Skip to content

Commit 7ec93fb

Browse files
committed
test_runner: color errors only when colors are available
PR-URL: #47394 Fixes: #47393 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent af8ed02 commit 7ec93fb

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)