Skip to content

Commit ee4a6ea

Browse files
committed
docs: name the coverage columns
1 parent 911336e commit ee4a6ea

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ A long-running DOM suite: 80 jsdom test files through 2 workers, each file holdi
275275

276276
Whole-process wall clock of `vitest run` on the bold row of each app above, median of 3 reps (design-system and long-haul: 5 reps), without coverage and with each provider. Same machine and protocol as above. 4.1.10 is the pinned install with `@vitest/coverage-v8` 4.1.10 on `ast-v8-to-istanbul` 1.0.4. 5.0.0 is the local build (5.0.0-rc.2 plus 41 commits, `130f79b8b`) with its own `@vitest/coverage-v8` on `ast-v8-to-istanbul` 1.0.5. Default coverage options: only files loaded by the tests are covered, and the `text`, `html`, `clover`, and `json` reports are written. To regenerate: `pnpm bench:coverage --label vitest-4.1.10-coverage`, then `pnpm bench:coverage --label vitest-5.0-coverage` with the linked build, then `node scripts/render-coverage.mjs results/vitest-4.1.10-coverage.json results/vitest-5.0-coverage.json`.
277277

278-
| app | 4.1.10 none | 5.0.0 none | Δ | 4.1.10 v8 | 5.0.0 v8 | Δ | 4.1.10 istanbul | 5.0.0 istanbul | Δ |
278+
| app | 4.1.10 no coverage | 5.0.0 no coverage | Δ | 4.1.10 coverage-v8 | 5.0.0 coverage-v8 | Δ | 4.1.10 coverage-istanbul | 5.0.0 coverage-istanbul | Δ |
279279
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
280280
| micro-utils | 0.25s | 0.24s | −2% | 0.29s | 0.29s | ~0 | 0.39s | 0.38s | −4% |
281281
| node-library | 0.29s | 0.28s | −3% | 0.53s | 0.51s | −4% | 0.65s | 0.56s | −14% |

‎scripts/render-coverage.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ const delta = (before, after) => {
2727
return Math.abs(pct) < 1.5 ? '~0' : `${pct > 0 ? '+' : '−'}${Math.abs(pct).toFixed(0)}%`
2828
}
2929

30+
const LABELS = { none: 'no coverage', v8: 'coverage-v8', istanbul: 'coverage-istanbul' }
3031
const many = versions.length > 1
3132
const head = ['app']
3233
const align = ['---']
3334
for (const provider of COVERAGE_PROVIDERS) {
3435
versions.forEach((version, index) => {
35-
head.push(many ? `${version.label} ${provider}` : provider)
36+
head.push(many ? `${version.label} ${LABELS[provider]}` : LABELS[provider])
3637
align.push('---:')
3738
if (index > 0) {
3839
head.push('Δ')

0 commit comments

Comments
 (0)