jest-vue-preprocessor
jest-vue-preprocessor copied to clipboard
Vue Components do not appear in code coverage if there is no style tag
Submitting
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request
Current behavior If you have a component without style tags, it disappears from the coverage. Adding an empty style block fixes this. Expected behavior Should still show up in coverage even without
Minimal reproduction of the problem with instructions Take any starter project for jest-vue, add a single file component - delete the style tag, run coverage.
What is the motivation / use case for changing the behavior? Less wtf moments ;)
-
jest-vue-preprocessor: 1.1.X 1.3.1
-
Node version : [ OSX ] 8
-
Platform: [ OSX ]
This is not a big issue, just so if anyone else is pondering this - they can see why it's not working.
Also, removing mapCoverage from jest shows the missing file, but screws up the line obviously.
I was having the exact same problem, couldn't figure out why it wasn't showing up on coverage, found this and tried adding the style tag and now it works.