jest-html
jest-html copied to clipboard
React.Fragment not supported
React.Fragment tag is not being supported and the element rendered loses the css content
Could you please provide an example of this?
Could you please check whether the problem is solved in v1.5.0?
No, the issue persists. I noticed that the NavLink element from react-router-dom is losing its CSS.
Eg:
<div>
<NavLink className='button is-info is-pulled-right is-rounded' to='/orders'>Orders </NavLink>
</div>
is correctly rendered as
<a class="button is-info is-pulled-right is-rounded" href="/orders">
Orders
</a>
But inside React.Fragment,
<React.Fragment>
<NavLink className='button is-info is-pulled-right is-rounded' to='/orders'>Orders </NavLink>
</React.Fragment>
is incorrectly rendered as
<a aria-current="{null}" classname="button is-info is-pulled-right is-rounded" href="/orders" onclick="{[Function]}" style="{undefined}">
Orders
</a>
Did you manage to isolate the problem without react-router components? I mean, just with React.Fragment and simple divs, for instance...
Yes, css on normal div is rendering correctly.
Any update on this issue?
Could you please provide an example of the error with React.Fragment but without React Router?
Yes, facing the same issue without React Router as wel. Please find the sample @ https://github.com/Punith13/react-fragment-jest-html
Note the difference of css not being applied to "Test button" in the React.Fragment component
Any update on this issue?