@cldmv/vitest-runner 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/report.mjs +6 -3
package/package.json
CHANGED
package/src/core/report.mjs
CHANGED
|
@@ -189,13 +189,16 @@ export async function printCoverageSummary(cwd, extraCoverageArgs, worstCount =
|
|
|
189
189
|
.filter((r) => Math.min(r.lines, r.stmts, r.fns, r.branches) < 100)
|
|
190
190
|
.sort((a, b) => Math.min(a.lines, a.stmts, a.fns, a.branches) - Math.min(b.lines, b.stmts, b.fns, b.branches));
|
|
191
191
|
|
|
192
|
-
console.log("\n" + chalk.bold("📉 WORST COVERAGE FILES (
|
|
192
|
+
console.log("\n" + chalk.bold("📉 WORST COVERAGE FILES (lowest metric)"));
|
|
193
193
|
console.log("-".repeat(80));
|
|
194
194
|
|
|
195
195
|
const rowsToShow = fileRows.slice(0, worstCount);
|
|
196
196
|
rowsToShow.forEach(({ file, lines, stmts, fns, branches }) => {
|
|
197
|
-
const
|
|
198
|
-
|
|
197
|
+
const worst = Math.min(lines, stmts, fns, branches);
|
|
198
|
+
const extras = chalk.dim(
|
|
199
|
+
`lines ${lines.toFixed(0)}% | stmts ${stmts.toFixed(0)}% | fns ${fns.toFixed(0)}% | branches ${branches.toFixed(0)}%`
|
|
200
|
+
);
|
|
201
|
+
console.log(` ${colourPct(chalk, worst)}% ${chalk.dim(file)} ${extras}`);
|
|
199
202
|
});
|
|
200
203
|
|
|
201
204
|
if (fileRows.length > worstCount) {
|