Ignore code in SFC <template> tags in coverage report. #8957
conorbdaly
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Maybe something like #3183 (reply in thread) would work?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are currently looking into migrating a test suite from jest/vue-test-utils to vitest. Previously Jest did not provide coverage of code in SFC templates, however when switching over to vitest we find that a lot of template code is showing up as uncovered.
Most of the uncovered code is difficult to trigger, and is unlikely to provide much value in testing. (Think event handlers on third party components, doing simple things like assigning values.)
I would suggest an option like ignoreVueTemplate passed to the coverage options in the define config to turn this on and off.
Does anyone have a workaround to ignore template coverage for now?
Beta Was this translation helpful? Give feedback.
All reactions