mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(ci): simplify portable test failure details (#16415)
This commit is contained in:
1 parent
fd4c5aa149
commit
c2b3ca2b11
1 file changed
+18
-22
+18
-22
@@ -118,28 +118,24 @@ if (passed && verifyInventory) {
|
||||
const publishesHistory = passed && !selected;
|
||||
const skippedFiles = files.filter(({ state }) => state === "skipped");
|
||||
const failureListLimit = 20;
|
||||
const failureDetails =
|
||||
!passed || failedFiles.length > 0
|
||||
? [
|
||||
`Failed test modules reported: ${failedFiles.length}.`,
|
||||
...(incompleteFiles.length
|
||||
? [
|
||||
`Queued or pending test modules reported: ${incompleteFiles.length}.`,
|
||||
]
|
||||
: []),
|
||||
...failedFiles
|
||||
.slice(0, failureListLimit)
|
||||
.map((name) => `- ${JSON.stringify(name)}`),
|
||||
...(failedFiles.length > failureListLimit
|
||||
? [
|
||||
`… ${failedFiles.length - failureListLimit} more in the test report.`,
|
||||
]
|
||||
: []),
|
||||
...(report.unhandledErrors === undefined
|
||||
? []
|
||||
: [`Unhandled Vitest errors reported: ${report.unhandledErrors}.`]),
|
||||
]
|
||||
: [];
|
||||
const failureDetails = [];
|
||||
if (!passed) {
|
||||
failureDetails.push(`Failed test modules reported: ${failedFiles.length}.`);
|
||||
if (incompleteFiles.length)
|
||||
failureDetails.push(
|
||||
`Queued or pending test modules reported: ${incompleteFiles.length}.`,
|
||||
);
|
||||
for (const name of failedFiles.slice(0, failureListLimit))
|
||||
failureDetails.push(`- ${JSON.stringify(name)}`);
|
||||
if (failedFiles.length > failureListLimit)
|
||||
failureDetails.push(
|
||||
`… ${failedFiles.length - failureListLimit} more in the test report.`,
|
||||
);
|
||||
if (report.unhandledErrors !== undefined)
|
||||
failureDetails.push(
|
||||
`Unhandled Vitest errors reported: ${report.unhandledErrors}.`,
|
||||
);
|
||||
}
|
||||
const shadowNotes = [];
|
||||
if (
|
||||
process.env.CI_COMPARE_TEST_SHADOW === "true" &&
|
||||
|
||||
Reference in new issue
Block a user