Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coverage): Exclude build/ #29

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

donmccurdy
Copy link
Member

@donmccurdy donmccurdy commented Oct 31, 2024

Currently yarn coverage reports a large block of uncovered files in build/ and node_modules/. As far as I can tell, this happens because tests execute the build/ files, and use sourcemaps to assign coverage back to the source files. We bundle some source files from node_modules/ (to be removed in #28 soon), and so certain files from node_modules/@deck.gl/... also end up in our coverage report.

Based on the configuration options listed at https://vitest.dev/guide/coverage, I would have thought --coverage.exclude build would be the way to fix this, but it seems to apply the exclusion before resolving sourcemaps, and so no coverage is reported with that option. The best working option I've been able to find is --coverage.all false which simply does not report files with no coverage. All of the "real" source files have >0 coverage (excluding types-only files, which contain no runtime code), so this does not hide any source files from the report, but in theory it could.

@donmccurdy
Copy link
Member Author

Coverage is broken without this, and I haven't been able to find another way of fixing it. Going to merge, but still open to other ideas.

@donmccurdy donmccurdy merged commit ab9c5a0 into main Nov 7, 2024
4 checks passed
@donmccurdy donmccurdy deleted the fix/coverage-exclude-build branch November 7, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant