Pretty Print Some DOM To Debug A Test
Our test's assertions can help guide what needs to change in the code. Sometimes those test failures can be too opaque to be helpful.
It'd be easier if we could just take a peek at how the component is rendering.
Passing the rendered container or elements that we've queried for to the prettyDOM
utility creates a formatted, syntax-highlighted version of that part of the virtual DOM (without all the React Internal noise). This can then be logged out for debugging purposes.
Last updated