Commit fc794d8
committed
Switch Vitest unit coverage provider from v8 to Istanbul
The merged `frontend` Codecov flag was reporting ~44% even though the
`frontend-component` flag alone was at ~61% on the same code. A
union-aggregated metric can't drop below a contributing component, so
the three suites were measuring on different yardsticks.
V8 emits ~183 DA: records per source file (~86k total) because V8's
native coverage API reports hits on nearly every executable line --
imports, declarations, closing braces -- as needed for engine
profiling. Istanbul (used by Playwright CT / E2E via
vite-plugin-istanbul) emits ~61 DA: per file (~27k total) because it
only instruments statements. Same code, ~3x denominator gap. Codecov
unions per-file and keeps V8's larger line set, so Istanbul hits from
the CT/E2E uploads can never close the gap.
Standardise all three suites on Istanbul:
- Swap @vitest/coverage-v8 -> @vitest/coverage-istanbul in
frontend/package.json (same ^3.1.2 to match vitest).
- Set coverage.provider = "istanbul" in frontend/vite.config.ts and
refresh the `all: true` rationale comment.
- Regenerate frontend/yarn.lock.
Per-suite Codecov flag tagging and `all: true` are unchanged -- the
merge is still server-side, and `all: true` still ensures untested
files appear in the lcov so the denominator lines up with CT/E2E.
Local smoke: new unit lcov reports ~451 SF and ~24k DA (previously
~86k). tsc --noEmit clean.1 parent a5173f5 commit fc794d8
4 files changed
Lines changed: 17 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 10 | | |
19 | 11 | | |
20 | 12 | | |
| |||
366 | 358 | | |
367 | 359 | | |
368 | 360 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | 361 | | |
375 | 362 | | |
376 | 363 | | |
| |||
1264 | 1251 | | |
1265 | 1252 | | |
1266 | 1253 | | |
1267 | | - | |
| 1254 | + | |
1268 | 1255 | | |
1269 | 1256 | | |
1270 | 1257 | | |
| |||
2855 | 2842 | | |
2856 | 2843 | | |
2857 | 2844 | | |
2858 | | - | |
| 2845 | + | |
2859 | 2846 | | |
2860 | | - | |
2861 | | - | |
| 2847 | + | |
| 2848 | + | |
2862 | 2849 | | |
2863 | | - | |
2864 | | - | |
2865 | | - | |
| 2850 | + | |
2866 | 2851 | | |
2867 | 2852 | | |
| 2853 | + | |
2868 | 2854 | | |
2869 | 2855 | | |
2870 | 2856 | | |
2871 | | - | |
2872 | 2857 | | |
2873 | | - | |
2874 | 2858 | | |
2875 | 2859 | | |
2876 | 2860 | | |
| |||
3122 | 3106 | | |
3123 | 3107 | | |
3124 | 3108 | | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | | - | |
3133 | | - | |
3134 | 3109 | | |
3135 | 3110 | | |
3136 | 3111 | | |
| |||
0 commit comments