Skip to content

Commit 3165e21

Browse files
committed
ci: better style on the tests report
1 parent 2473421 commit 3165e21

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

actions_scripts/tests_report_on_pr_comment.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ export default async (github, context, steps) => {
1212
const output = steps.run_tests.outputs.tests_report;
1313
const sanitized = output.split(marker);
1414

15-
let msg = getTitleMsg();
16-
msg += (sanitized.length > 1) ? sanitized[1] : sanitized[0];
15+
let msg = (sanitized.length > 1) ? sanitized[1] : sanitized[0];
1716

18-
const stylizedMsg = formatTestOutput(msg);
17+
const stylizedMsg = getTitleMsg() + formatTestOutput(msg);
1918

2019
if (!isLocalRun && sanitized.length >= 1) {
2120
createPrComment(github, context, prNumber, stylizedMsg);
@@ -59,7 +58,7 @@ export function formatTestOutput(textMsg) {
5958
if (line.startsWith('FAIL')) {
6059
return `💥 ${line}`;
6160
}
62-
return `\t ${line.trim()}`;
61+
return `\t${line.trim()}`;
6362
})
6463
.join('\n');
6564
}

0 commit comments

Comments
 (0)