(tmp) Add debugging traces

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>
This commit is contained in:
Raul Sanchez-Mateos 2025-06-26 09:16:08 +02:00
parent 6adeee0597
commit 11c8e6513a
2 changed files with 19 additions and 25 deletions

13
dist/index.js generated vendored
View file

@ -2110,21 +2110,16 @@ function getTestsReport(ts, runIndex, suiteIndex, options) {
sections.push(`### ${icon}\xa0${tsNameLink}`); sections.push(`### ${icon}\xa0${tsNameLink}`);
sections.push('```'); sections.push('```');
for (const grp of groups) { for (const grp of groups) {
if (grp.name) {
sections.push(grp.name);
}
const space = grp.name ? ' ' : '';
for (const tc of grp.tests) { for (const tc of grp.tests) {
if (options.listTests === 'failed' && tc.result !== 'failed') { if (options.listTests === 'failed' && tc.result !== 'failed') {
continue; continue;
} }
const result = getResultIcon(tc.result); const result = getResultIcon(tc.result);
sections.push(`${space}${result} ${tc.name}`); sections.push(`${result} ${tc.name}`);
if (tc.error) { if (tc.error) {
const lines = (tc.error.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(tc.error.details)?.trim()) const message = tc.error.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(tc.error.details)?.trim();
?.split(/\r?\n/g) if (message) {
.map(l => '\t' + l); const lines = message.split(/\r?\n/g).map(l => '\t' + l);
if (lines) {
sections.push(...lines); sections.push(...lines);
} }
} }

View file

@ -265,10 +265,9 @@ function getTestsReport(ts: TestSuiteResult, runIndex: number, suiteIndex: numbe
const result = getResultIcon(tc.result) const result = getResultIcon(tc.result)
sections.push(`${result} ${tc.name}`) sections.push(`${result} ${tc.name}`)
if (tc.error) { if (tc.error) {
const lines = (tc.error.message ?? getFirstNonEmptyLine(tc.error.details)?.trim()) const message = tc.error.message ?? getFirstNonEmptyLine(tc.error.details)?.trim();
?.split(/\r?\n/g) if (message) {
.map(l => '\t' + l) const lines = message.split(/\r?\n/g).map(l => '\t' + l);
if (lines) {
sections.push(...lines) sections.push(...lines)
} }
} }