diff --git a/lib/internal/test_runner/reporter/dot.js b/lib/internal/test_runner/reporter/dot.js index 45ff047bc4e5a0..fa29fdc73499fa 100644 --- a/lib/internal/test_runner/reporter/dot.js +++ b/lib/internal/test_runner/reporter/dot.js @@ -10,6 +10,7 @@ module.exports = async function* dot(source) { let count = 0; let columns = getLineLength(); const failedTests = []; + const diagnostics = []; for await (const { type, data } of source) { if (type === 'test:pass') { yield `${colors.green}.${colors.reset}`; @@ -18,6 +19,9 @@ module.exports = async function* dot(source) { yield `${colors.red}X${colors.reset}`; ArrayPrototypePush(failedTests, data); } + if (type === 'test:diagnostic') { + ArrayPrototypePush(diagnostics, data); + } if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) { yield '\n'; @@ -33,6 +37,12 @@ module.exports = async function* dot(source) { yield formatTestReport('test:fail', test); } } + if (diagnostics.length > 0) { + yield `\n${colors.yellow}Diagnostics:${colors.white}\n\n`; + for (const diag of diagnostics) { + yield `${colors.yellow}! ${diag.message}${colors.reset}\n`; + } + } }; function getLineLength() {