From 6c6d74ea803d6e74e03753b7981119d418411aef Mon Sep 17 00:00:00 2001 From: Bot Date: Fri, 28 Aug 2026 22:23:57 +0200 Subject: [PATCH] test_runner: print failed coverage reports with dot runner Fixes https://github.com/nodejs/node/issues/60884 --- lib/internal/test_runner/reporter/dot.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/internal/test_runner/reporter/dot.js b/lib/internal/test_runner/reporter/dot.js index 45ff047bc4e5..d85dd0057d44 100644 --- a/lib/internal/test_runner/reporter/dot.js +++ b/lib/internal/test_runner/reporter/dot.js @@ -18,7 +18,14 @@ module.exports = async function* dot(source) { yield `${colors.red}X${colors.reset}`; ArrayPrototypePush(failedTests, data); } - if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) { + if (type === 'test:diagnostic' && data.level === 'error') { + yield `${colors.red}X${colors.reset}`; + ArrayPrototypePush(failedTests, { + name: data.message, + nesting: data.nesting, + }); + } + if ((type === 'test:fail' || type === 'test:pass' || (type === 'test:diagnostic' && data.level === 'error')) && ++count === columns) { yield '\n'; // Getting again in case the terminal was resized.