Skip to content

Coverage issues #504

@SamuelWei

Description

@SamuelWei

Running the coverage gives me a strange output, missing some code blocks, even if the code should perform exactly the same

Missing coverage in lines 291-305
Bildschirmfoto 2022-10-21 um 16 16 59

Working: Saving promise to an variable and using it for .then and .catch
Bildschirmfoto 2022-10-21 um 16 10 12

Working: Saving promise to an used variable
Bildschirmfoto 2022-10-21 um 16 16 17

Is there something working with the coverage or am I missing something obvious?

I have worked through many issues and recommendations including multiple jest and vue-jest versions.
I also used v8 and the default babel coverage reporter. However both coverage providers cause issues in my vue2 project and none is working really accurate.

My current config:
vue: 2.6.14
@vue/vue2-jest: 29.1.1
jest: 29.2.1

jest.config.js

....
transform: {
    '^.+\\.vue$': '@vue/vue2-jest',
    '^.+\\.js$': 'babel-jest'
},
....

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