mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test_runner: use test: symbol on second print of parent test
PR-URL: https://github.com/nodejs/node/pull/54956 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
465d05018a
commit
449dad0db0
3 files changed
+6
-8
No files matched your search
@@ -72,16 +72,14 @@ function formatTestReport(type, data, prefix = '', indent = '', hasChildren = fa
|
||||
title += ` # ${typeof todo === 'string' && todo.length ? todo : 'TODO'}`;
|
||||
}
|
||||
const error = formatError(data.details?.error, indent);
|
||||
if (hasChildren) {
|
||||
// If this test has had children - it was already reported, so slightly modify the output
|
||||
const err = !error || data.details?.error?.failureType === 'subtestsFailed' ? '' : `\n${error}`;
|
||||
return `${prefix}${indent}${color}${reporterUnicodeSymbolMap['arrow:right']}${colors.white}${title}${err}`;
|
||||
}
|
||||
const err = hasChildren ?
|
||||
(!error || data.details?.error?.failureType === 'subtestsFailed' ? '' : `\n${error}`) :
|
||||
error;
|
||||
if (skip !== undefined) {
|
||||
color = colors.gray;
|
||||
symbol = reporterUnicodeSymbolMap['hyphen:minus'];
|
||||
}
|
||||
return `${prefix}${indent}${color}${symbol}${title}${colors.white}${error}`;
|
||||
return `${prefix}${indent}${color}${symbol}${title}${colors.white}${err}`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
[31m✖ should pass but parent fail [90m(*ms)[39m[39m
|
||||
[32m'test did not finish before its parent and was cancelled'[39m
|
||||
|
||||
[31m▶ [39mparent [90m(*ms)[39m
|
||||
[31m✖ parent [90m(*ms)[39m[39m
|
||||
[34mℹ tests 6[39m
|
||||
[34mℹ suites 0[39m
|
||||
[34mℹ pass 1[39m
|
||||
|
||||
@@ -12,7 +12,7 @@ AFTER 2
|
||||
✔ should run 1 (*ms)
|
||||
﹣ should not run (*ms) # SKIP
|
||||
✔ should run 2 (*ms)
|
||||
▶ suite runs with mixture of skipped tests (*ms)
|
||||
✔ suite runs with mixture of skipped tests (*ms)
|
||||
ℹ tests 4
|
||||
ℹ suites 2
|
||||
ℹ pass 2
|
||||
|
||||
Reference in new issue
Block a user