diff --git a/test/parallel/test-assert-checktag.js b/test/parallel/test-assert-checktag.js index 38ebaa1a143..70a67e15d3f 100644 --- a/test/parallel/test-assert-checktag.js +++ b/test/parallel/test-assert-checktag.js @@ -2,6 +2,12 @@ require('../common'); const assert = require('assert'); +// Disable colored output to prevent color codes from breaking assertion +// message comparisons. This should only be an issue when process.stdout +// is a TTY. +if (process.stdout.isTTY) + process.env.NODE_DISABLE_COLORS = '1'; + // Turn off no-restricted-properties because we are testing deepEqual! /* eslint-disable no-restricted-properties */