Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using vue2-jest and code coverage is broken for a while now. I noticed a difference between
processScript
in vue2-jest vs. vue3-jest:vue2-jest:
vue-jest/packages/vue2-jest/lib/process.js
Lines 35 to 53 in dbe8022
vue3-jest:
vue-jest/packages/vue3-jest/lib/process.js
Lines 30 to 49 in dbe8022
The call to
mapLines
is missing for vue2-jest.Adding the call, I can see two differences in the tests:
<template>
and<style>
block didn't show up at all in the html coverage output. Now they do.e2e/2.x/basic/coverage/lcov-report/basic/components/TemplateString.vue.html
file, I see the covered lines now to be in the script block as expected. Before this change they were put somewhere on the template block, which didn't make sense.The change also made code coverage in my repo work properly again, at least I think so from the output I get.