Skip to content

Vue Components do not appear in code coverage if there is no style tag #43

@phouri

Description

@phouri

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 <style> tag

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions