Scope coverage to our own sources

v8 coverage had no include, so it walked the entire project root. With the
read-only reference_code checkout present that pulled 572 of 1031 entries into
the report and reported 23.94% for "All files" - a number describing the
reference, not this project. Restricting it to packages/*/src puts the figure
at 59.71%.

Nothing failed on this before because there are no coverage thresholds, but the
report was misleading anyone reading it.
This commit is contained in:
2026-10-19 00:39:57 +08:00
parent cc644c59f6
commit 3c963bb1d9
+8
View File
@@ -13,5 +13,13 @@ export default defineConfig({
test: { test: {
include: ['tests/**/*.test.ts'], include: ['tests/**/*.test.ts'],
setupFiles: ['tests/setup.ts'], setupFiles: ['tests/setup.ts'],
coverage: {
// Without an explicit include, v8 coverage walks the whole project root.
// While the read-only reference_code/ checkout was present that pulled in
// ~570 of its files and diluted every percentage below.
provider: 'v8',
include: ['packages/*/src/**'],
exclude: ['**/vendor/**', '**/*.d.ts'],
},
}, },
}) })