Description
I am looking to upgrade several projects to Vue 3 and I am running into an interesting issue when collecting code coverage. For some reason, when switching to Vue 3, the code coverage statistics are incorrect, but the tests are running correctly. Below is a repository that minimally reproduces the issue I am running into. Also attached are a couple of screenshots that show the difference in coverage between Vue 2 and Vue 3.
https://github.com/sam-pastoriza/vue-3-coverage
With Vue 2, you get the following coverage in the repo.
With Vue 3, you get the following coverage, without changing the tests.
A readme file in that repository details how I switch between Vue 2 and Vue 3.
A couple of notes on the structure of the project I am working with.
- We use
vue-class-component
as a library. I don't think this is causing the issue, but I could be wrong. - We are required to split up the components into separate .ts and .vue files.
Many thanks for the help. Hopefully this is the right place to post this issue.