Skip to content

Commit ac041a2

Browse files
committed
test_runner: print failed coverage reports with dot reporter
When coverage threshold is not met, the dot reporter now outputs the error message so users can understand why tests failed. Refs: #60884
1 parent 48c208f commit ac041a2

File tree

1 file changed

+4
-0
lines changed
  • lib/internal/test_runner/reporter

1 file changed

+4
-0
lines changed

lib/internal/test_runner/reporter/dot.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ module.exports = async function* dot(source) {
1818
yield `${colors.red}X${colors.reset}`;
1919
ArrayPrototypePush(failedTests, data);
2020
}
21+
if (type === 'test:diagnostic') {
22+
const levelColor = data.level === 'error' ? colors.red : data.level === 'warning' ? colors.yellow : colors.white;
23+
yield `\n${levelColor}${data.message}${colors.reset}\n`;
24+
}
2125
if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) {
2226
yield '\n';
2327

0 commit comments

Comments
 (0)