Part 3 Testing React Applications – Enzyme installation
Hi, the next step is install enzyme into our project so we need to run this command in the terminal:
npm i –save-dev enzyme enzyme-adapter-react-16
Then open in our file that we created in post 1 called todo.test.js and import configure, shallow and mount from Enzyme because we will need this dependencies for the future in our test file.
And finally we need to configure the enzyme adapter that we need to use in our test.
If we just save this we are pretty much ready to start writing our first unit test for the todo component.
Ok for now we complete the part 3 of testing react applications, I will publish the part 4 of this course.
Read
Part 1 Testing React Applications – Environment
Part 2 Testing React Applications – Enzyme Shallow and Full rendering
Criss