-
Notifications
You must be signed in to change notification settings - Fork 156
chore(vue3-jest): add missing code coverage e2e for #422 #423
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
Conversation
Should the following be added to coverageThreshold: {
global: {
lines: 1
}
} |
Due to test name change
@lmiller1990 this appears to be an issue between Vue Jest and the default (babel) coverage provider used by Jest. Running these tests (and in production repo) with the experimental v8 engine as the coverage provider correctly outputs coverage data for SFC Vue files - Though I'm unable to use that as a temporary client-side fix in GitHub Actions as V8 is 6x slower to run (and without increasing heap size to 4GB, also crashes from OOM) |
I see. What's the next step here, then, to get this fixed and merged? |
Related? |
Unfortunately I do not have the available time to investigate why and what package between vue-jest, jest and whichever babel package is responsible for coverage is causing the issue.
Checking that issue, it seems to be the exact opposite behaviour of this issue - no (javascript) coverage with v8 and coverage with the default babel coverage provider. Here, there's no Vue SFC coverage (javascript is covered fine) with the default babel coverage provider, but v8 coverage provider has Vue SFC coverage. |
Thank you for this workaround, it works just fine in my specific case. If helps anyone in the future, my setup:
|
See #422 for details on the issue.
This minimal reproduction reproduces the bug I see in our project, with SFC Vue files that are imported in test files vanish from coverage reports. Untested SFC Vue files are reported correctly with no code coverage.
Both
Basic.vue
andUntested.vue
are identical and use the current SFC<script setup>
syntax as of Vue 3.2.22