Skip to content

Commit

Permalink
test_runner: color errors only when colors are available
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MoLow committed Jul 6, 2023
1 parent d5fc823 commit 0b32a8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/test_runner/reporter/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const {
const assert = require('assert');
const Transform = require('internal/streams/transform');
const { inspectWithNoCustomRetry } = require('internal/errors');
const { green, blue, red, white, gray } = require('internal/util/colors');
const { green, blue, red, white, gray, hasColors } = require('internal/util/colors');
const { getCoverageReport } = require('internal/test_runner/utils');

const inspectOptions = { __proto__: null, colors: true, breakLength: Infinity };
const inspectOptions = { __proto__: null, colors: hasColors, breakLength: Infinity };

const colors = {
'__proto__': null,
Expand Down

0 comments on commit 0b32a8c

Please sign in to comment.