vue-jest icon indicating copy to clipboard operation
vue-jest copied to clipboard

HTML Coverage report showing wrong files when including files using src

Open alexgrozav opened this issue 6 years ago • 2 comments

This might be related to #36. When I'm running tests with code coverage on my project, the code coverage report is showing a different .vue file than the one I'm opening.

You can see the behaviour when running tests using npm run test on inkline: https://github.com/inkline/inkline, then opening one of the generated coverage files, such as tests/coverage/components/CheckboxGroup/index.vue.html

Any help would be appreciated.

alexgrozav avatar Feb 25 '19 16:02 alexgrozav

A possible cause for this could be that all the files are named index.vue.

alexgrozav avatar Feb 25 '19 16:02 alexgrozav

I can confirm that the coverage files start showing properly again after moving components/MyComponent/index.vue to components/MyComponent.vue and writing the script, style and template inside the vue file instead of using src.

alexgrozav avatar Feb 25 '19 17:02 alexgrozav