DEV Community

Discussion on: Enzyme

Collapse
 
dorshinar profile image
Dor Shinar

Shallow only mounts the component and "mocks" the rendered output of it's children. Mount renders the entire component tree. You can print wrapper.debug() to see the difference clearly.
Using shallow your tests run much faster, and are less prone to side effects, so the general rule of thumb is that you should always use Shallow, unless you need Mount.

Collapse
 
eduaugustus profile image
Eduardo Augusto

Thks Dor :D