We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec7921 commit 6ef1730Copy full SHA for 6ef1730
lib/internal/errors.js
@@ -270,12 +270,14 @@ class AssertionError extends Error {
270
if (message != null) {
271
super(message);
272
} else {
273
- const util = lazyUtil();
274
- if (process.stdout.isTTY && process.stdout.getColorDepth() !== 1) {
+ if (util_ === null &&
+ process.stdout.isTTY &&
275
+ process.stdout.getColorDepth() !== 1) {
276
green = '\u001b[32m';
277
white = '\u001b[39m';
278
red = '\u001b[31m';
279
}
280
+ const util = lazyUtil();
281
282
if (actual && actual.stack && actual instanceof Error)
283
actual = `${actual.name}: ${actual.message}`;
0 commit comments