You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this issue whilst comparing snapshots made with jest with and without coverage. When --coverage adds the istanbul babel plugin it adds random elements to the output.
What is the intention of passing a function as a child?
What happens here is that the function is serialized to a string and appended to the HTML. Istanbul modifies your code and therefore the string representation of the function looks different.
Either I'm not understanding your usecase or there is an issue with your code. Might you elaborate on your usecase?
Btw. when doing this in react it will not render the function at all. I.e. output would be empty.
I found this issue whilst comparing snapshots made with jest with and without coverage. When --coverage adds the istanbul babel plugin it adds random elements to the output.
I made a repo where you can see this in action: https://github.com/PepijnSenders/istanbul-preact-render-spy-bug
The text was updated successfully, but these errors were encountered: