Skip to content

Wrong coverage lines due to missing template #500

Closed
@meufel

Description

@meufel

Hey everyone,

first of all thanks for your work!

I'm facing a problem since the latest version of vue2-jest 29.1.0:

Problem Description

The coverage resulting from my tests does not contain the <template> part of my SFC-files.
This leads to

  1. wrong line numbers inside the cli text summary
  2. incomplete file representation inside the cobertura html report

Especially the 1) has a significant impact on my daily work writing tests.

SFC:
sfc

Text Summary:
text coverage

HTML Report:
html coverage

Reproduction

The following project shows the impact when running the tests: https://github.com/meufel/vue-jest-coverage-repro

Reseach Results

Looking at the changes coming with script setup support I noted that the related commit contains a snapshot, which also lost its template part (resp. its // representation).

Since I have to stick with v29.0.0 for now, is there an option to reenable the correct line number generation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions