December 2019
Intermediate to advanced
474 pages
10h 3m
English
The tests that we've created all use shallow rendering to render components, but, with Enzyme, we also have the option to mount components. When using this, we can enable lifecycles and test larger components deeper than just the first level. When we want to test multiple components at once, this is called integration testing. In our application, the components that are rendered directly by the routes are rendering other components as well. A good example of this is the Hotels component, which renders the list of hotels that were returned by the Context. Let's get started: