@@ -179,14 +179,17 @@ jobs:
179179 }
180180
181181 // --- Helpers ---
182- function delta(curr, prev) {
182+ function delta(curr, prev, positiveIsGood ) {
183183 const d = curr - prev;
184184 if (d === 0) return '±0';
185- return d > 0 ? `+${d}` : `${d}`;
185+ const str = d > 0 ? `+${d}` : `${d}`;
186+ if (positiveIsGood === undefined) return str;
187+ const icon = (positiveIsGood ? d > 0 : d < 0) ? ' 🟢' : ' 🔴';
188+ return str + icon;
186189 }
187190
188- function fmtCell(curr, prev) {
189- return `${curr} (${delta(curr, prev)})`;
191+ function fmtCell(curr, prev, positiveIsGood ) {
192+ return `${curr} (${delta(curr, prev, positiveIsGood )})`;
190193 }
191194
192195 function pct(covered, missed) {
@@ -201,7 +204,9 @@ jobs:
201204 function fmtPctDelta(curr, prev) {
202205 const d = curr - prev;
203206 if (Math.abs(d) < 0.05) return '±0.0%';
204- return d > 0 ? `+${d.toFixed(1)}%` : `${d.toFixed(1)}%`;
207+ const str = d > 0 ? `+${d.toFixed(1)}%` : `${d.toFixed(1)}%`;
208+ const icon = d > 0 ? ' 🟢' : ' 🔴';
209+ return str + icon;
205210 }
206211
207212 // --- Build Test Results table ---
@@ -217,7 +222,7 @@ jobs:
217222 if (!current[v]) {
218223 body += `| ${label} | - | - | - | - | - |\n`;
219224 } else {
220- body += `| ${label} | ${fmtCell(c.total, b.total)} | ${fmtCell(c.passed, b.passed)} | ${fmtCell(c.failed, b.failed)} | ${fmtCell(c.errors, b.errors)} | ${fmtCell(c.skipped, b.skipped)} |\n`;
225+ body += `| ${label} | ${fmtCell(c.total, b.total, true )} | ${fmtCell(c.passed, b.passed, true )} | ${fmtCell(c.failed, b.failed, false )} | ${fmtCell(c.errors, b.errors, false )} | ${fmtCell(c.skipped, b.skipped)} |\n`;
221226 }
222227 }
223228
@@ -235,7 +240,7 @@ jobs:
235240 }
236241 }
237242 if (hasAny) {
238- body += `| **Total** | **${fmtCell(totalCurr.total, totalBase.total)}** | **${fmtCell(totalCurr.passed, totalBase.passed)}** | **${fmtCell(totalCurr.failed, totalBase.failed)}** | **${fmtCell(totalCurr.errors, totalBase.errors)}** | **${fmtCell(totalCurr.skipped, totalBase.skipped)}** |\n`;
243+ body += `| **Total** | **${fmtCell(totalCurr.total, totalBase.total, true )}** | **${fmtCell(totalCurr.passed, totalBase.passed, true )}** | **${fmtCell(totalCurr.failed, totalBase.failed, false )}** | **${fmtCell(totalCurr.errors, totalBase.errors, false )}** | **${fmtCell(totalCurr.skipped, totalBase.skipped)}** |\n`;
239244 }
240245
241246 // --- Build Coverage table ---
0 commit comments