ISSUE: My test coverage drops in vitest when I integrate the react compiler, can that be fixed? #78
heath-freenome
started this conversation in
Feature Requests
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I've configured vitest to use the react compiler via babel plugin like so:
When I did that my branch coverage dropped. Will there be a way for the plugin to provide information (maps?) that can be used by coverage tools to verify that all the original source lines are actually being covered by tests?
In my situtation, I had a simple stateless functional component that generated an SVG with an optional title like so:
The generated code looked like:
And vitest says that the branches for
titleAccess = ''and{titleAccess && <title>{titleAccess}</title>}aren't fully covered.NOTE: This is just for a simple component. I'm guessing as my components get more complex their coverage data will change significantly
Beta Was this translation helpful? Give feedback.
All reactions