Spelunking Through Components With Enzyme's Dive
Most of the components we write have other components nested in them.
If we are to shallow render the above component using Enzyme, we'll only see things one layer deep:
If we'd like to explore a particular child of the rendered component further, we can do a little find
and dive
.
This allows us to make pinpoint assertions about how our components render without mounting the entire thing.
See a live example here.
h/t Vidal Ekechukwu
Last updated