Find Nodes from a Shallow Rendered Component

Tyler Clark
InstructorTyler Clark

Share this video with your friends

Send Tweet

Once we have a shallowed rendered component, we can now test that the expected nodes rendered are correct. We will use Jest’s built in assertions as well as some Enzyme shallow render methods in our tests. The render methods include .find, .exists, .children, .hasClass, and .text.