@cldmv/vitest-runner 1.0.0 → 1.0.2
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/README.md +3 -3
- package/package.json +1 -1
- package/src/core/report.mjs +4 -2
package/README.md
CHANGED
|
@@ -320,15 +320,15 @@ MIT
|
|
|
320
320
|
<!-- [release_date_url]: https://github.com/CLDMV/vitest-runner/releases -->
|
|
321
321
|
|
|
322
322
|
[npm version]: https://img.shields.io/npm/v/vitest-runner.svg?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837
|
|
323
|
-
[npm_version_url]: https://www.npmjs.com/package/vitest-runner
|
|
323
|
+
[npm_version_url]: https://www.npmjs.com/package/@cldmv/vitest-runner
|
|
324
324
|
[npm downloads]: https://img.shields.io/npm/dm/vitest-runner.svg?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837
|
|
325
|
-
[npm_downloads_url]: https://www.npmjs.com/package/vitest-runner
|
|
325
|
+
[npm_downloads_url]: https://www.npmjs.com/package/@cldmv/vitest-runner
|
|
326
326
|
[github downloads]: https://img.shields.io/github/downloads/CLDMV/vitest-runner/total?style=for-the-badge&logo=github&logoColor=white&labelColor=181717
|
|
327
327
|
[github_downloads_url]: https://github.com/CLDMV/vitest-runner/releases
|
|
328
328
|
[last commit]: https://img.shields.io/github/last-commit/CLDMV/vitest-runner?style=for-the-badge&logo=github&logoColor=white&labelColor=181717
|
|
329
329
|
[last_commit_url]: https://github.com/CLDMV/vitest-runner/commits
|
|
330
330
|
[npm last update]: https://img.shields.io/npm/last-update/vitest-runner?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837
|
|
331
|
-
[npm_last_update_url]: https://www.npmjs.com/package/vitest-runner
|
|
331
|
+
[npm_last_update_url]: https://www.npmjs.com/package/@cldmv/vitest-runner
|
|
332
332
|
[coverage]: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FCLDMV%2Fvitest-runner%2Fbadges%2Fcoverage.json&style=for-the-badge&logo=vitest&logoColor=white
|
|
333
333
|
[coverage_url]: https://github.com/CLDMV/vitest-runner/blob/badges/coverage.json
|
|
334
334
|
[contributors]: https://img.shields.io/github/contributors/CLDMV/vitest-runner.svg?style=for-the-badge&logo=github&logoColor=white&labelColor=181717
|
package/package.json
CHANGED
package/src/core/report.mjs
CHANGED
|
@@ -186,12 +186,14 @@ export async function printCoverageSummary(cwd, extraCoverageArgs, worstCount =
|
|
|
186
186
|
fns: data.functions?.pct ?? 0,
|
|
187
187
|
branches: data.branches?.pct ?? 0
|
|
188
188
|
}))
|
|
189
|
-
.
|
|
189
|
+
.filter((r) => Math.min(r.lines, r.stmts, r.fns, r.branches) < 100)
|
|
190
|
+
.sort((a, b) => Math.min(a.lines, a.stmts, a.fns, a.branches) - Math.min(b.lines, b.stmts, b.fns, b.branches));
|
|
190
191
|
|
|
191
192
|
console.log("\n" + chalk.bold("📉 WORST COVERAGE FILES (lines)"));
|
|
192
193
|
console.log("-".repeat(80));
|
|
193
194
|
|
|
194
|
-
fileRows.slice(0, worstCount)
|
|
195
|
+
const rowsToShow = fileRows.slice(0, worstCount);
|
|
196
|
+
rowsToShow.forEach(({ file, lines, stmts, fns, branches }) => {
|
|
195
197
|
const extras = chalk.dim(`stmts ${stmts.toFixed(0)}% | fns ${fns.toFixed(0)}% | branches ${branches.toFixed(0)}%`);
|
|
196
198
|
console.log(` ${colourPct(chalk, lines)}% ${chalk.dim(file)} ${extras}`);
|
|
197
199
|
});
|