diff --git a/lib/internal/test_runner/reporter/dot.js b/lib/internal/test_runner/reporter/dot.js index 496c819d69ea07..357a251ae73c87 100644 --- a/lib/internal/test_runner/reporter/dot.js +++ b/lib/internal/test_runner/reporter/dot.js @@ -1,15 +1,16 @@ 'use strict'; const { MathMax } = primordials; +const { red, green, clear } = require('internal/util/colors'); module.exports = async function* dot(source) { let count = 0; let columns = getLineLength(); for await (const { type } of source) { if (type === 'test:pass') { - yield '.'; + yield `${green}.${clear}`; } if (type === 'test:fail') { - yield 'X'; + yield `${red}X${clear}`; } if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) { yield '\n';