December 2019
Intermediate to advanced
474 pages
10h 3m
English
Enzyme is an open source JavaScript testing library that was created by Airbnb and works with almost every JavaScript library or framework. With Enzyme, you can also shallow render components to test the first level of the component, as well as render nested components, and simulate life cycles for integration tests. The Enzyme library can be installed with npm, and also needs an adapter to simulate React features. Let's get started:
npm install enzyme enzyme-adapter-react-16 --save-dev