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:
@@ -13,5 +13,13 @@ export default defineConfig({
|
||||
test: {
|
||||
include: ['tests/**/*.test.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'],
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user