-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage issues #504
Comments
I traced the issue down to babel-jest If the coverage is set to In the vue-jest process function a config is passed to babel-jest having the variable
I don't know why this is done and where to change this config value. @lmiller1990 Do you know why this is happening? |
I am not sure why this would be happening. If you play around in Do you think there's an issue in Jest or this bug is localize to Vue Jest? |
I just had a deeper look and found the instrument = true comes from https://github.com/facebook/jest/blob/6e5b1d60a1214e792b5229993b5475445e9c1a6e/packages/jest-transform/src/ScriptTransformer.ts#L703 |
Not sure - it was added back in jestjs/jest#785 before my involvement with the project. However, the issue that PR talks about (babel's helpers) should have been solved by supporting source maps, which we've done for a few years at this point. Happy to take a PR removing it if it doesn't do anything useful anymore 🙂 |
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
Working: Saving promise to an variable and using it for .then and .catch
Working: Saving promise to an used variable
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
The text was updated successfully, but these errors were encountered: