-
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 (and debugging from IDE) is broken with @vue/vue3-jest #514
Comments
Interestingly, if I take the internal compiled JS with source map from |
same bug in vue2 #480 |
Same issue in vue2, tried to fix it using some suggestions in #480 but they didn't work. Tried v8, but that is causing some other issues, see #504. Looks like vue-jest isn't getting much maintenance anymore, since vitest is the new default test driver. I had to change to vitest, as test coverage was critical for my project. |
Same here, we've got the same problem with the debugging. |
Can confirm, coverage is broken in latest
|
Edit: It looks like locking |
Anyone know how to get breakpoints to work properly in VSCode? Also got it jumping to random lines and inspecting variables says they don't exist in the current context. |
Update on debugging in VSCode This worked for me in VSCode's
|
Hi there,
we're having issues getting a correct coverage report and additionally, breakpoints from inside the IDE don't activate. When placing
debugger
statements, the IDE jumps to a completely different line.Reproduction:
npm install
npm run coverage
coverage/lcov-report/Dummy.vue.html
:The example repo uses the latest versions, a minimal set of dependencies (
@babel/preset-env
,@vue/vue3-jest
,babel-jest
,jest
,jest-environment-jsdom
) and a pretty minimal config. I unexpectedly had to include and configurebabel-jest
, too, but I hope it's minimal enough that there's no error in that part of the config.package.json (with jest and babel config)
I expect the issue is caused by somewhat broken source maps, but I did not make much progress when debugging it. Maybe the source map itself is intact, and just a line offset somewhere is wrong (because 1 line missing, 1 statement missing, 1 branch missing is all correct)?
The text was updated successfully, but these errors were encountered: