Logo Awesome React

Awesome React

Using AirBnb's Enzyme to Test React Components

Now that we have Enzyme, mocha, and except set up, we will write our first unit tests for our React component (shallow rendering).

Enzyme is an open source library from AirBnb's engineering team. It is a great utility for testing React components that makes it easier to assert, manipulate, and traverse your React Components' output.

Enzyme has a great API that is comparable to jQuery that makes unit testing React components much simpler and more fun.