Skip to content

Commit f9c3d52

Browse files
committed
test_runner: seperate style for expected failure and todo than failure
1 parent 79ddd1b commit f9c3d52

File tree

1 file changed

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

1 file changed

+7
-4
lines changed

lib/internal/test_runner/reporter/utils.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const reporterUnicodeSymbolMap = {
2424
'test:coverage': '\u2139 ',
2525
'arrow:right': '\u25B6 ',
2626
'hyphen:minus': '\uFE63 ',
27+
'warning:alert': '\u26A0',
2728
};
2829

2930
const reporterColorMap = {
@@ -76,18 +77,20 @@ function formatTestReport(type, data, showErrorDetails = true, prefix = '', inde
7677

7778
if (skip !== undefined) {
7879
title += ` # ${typeof skip === 'string' && skip.length ? skip : 'SKIP'}`;
80+
color = colors.gray;
81+
symbol = reporterUnicodeSymbolMap['hyphen:minus'];
7982
} else if (todo !== undefined) {
8083
title += ` # ${typeof todo === 'string' && todo.length ? todo : 'TODO'}`;
84+
color = colors.yellow;
85+
symbol = reporterUnicodeSymbolMap['warning:alert'];
8186
} else if (expectFailure !== undefined) {
8287
title += ` # EXPECTED FAILURE`;
88+
color = colors.yellow;
89+
symbol = reporterUnicodeSymbolMap['warning:alert'];
8390
}
8491

8592
const err = showErrorDetails && data.details?.error ? formatError(data.details.error, indent) : '';
8693

87-
if (skip !== undefined) {
88-
color = colors.gray;
89-
symbol = reporterUnicodeSymbolMap['hyphen:minus'];
90-
}
9194
return `${prefix}${indent}${color}${symbol}${title}${colors.white}${err}`;
9295
}
9396

0 commit comments

Comments
 (0)