Instructor - Tyler Clark
These notes go along with the Test React Components with Enzyme and Jest course from Tyler Clark
In this course, construct tests for our React components with Enzyme and Jest.
Throughout this course, you will learn about
- Create React App setup
- Enzyme initial setup
- Enzyme configuration for specific versions of React
- Accepted selectors
- Rendering methods
- Working with React lifecycles
- Component state
- Component props
- Working with Redux-connected components
- Using Jest snapshots to
- Guarantee the layout of component elements
- Replicate user interaction
- Test class methods
In the final lesson, we will recap these concepts through the testing of both a basic React form that sends an AJAX request on submit.
The code for each lesson in this course can be found here. Each branch contains code for its respective lesson. THERE IS NO BRANCH FOR LESSON 1, SO THE BRANCH NUMBERS 1-14 CORRESPOND WITH LESSON NUMBERS 2-15. Code for each lesson can also be found in the Resources section of each page of notes.
- 01-Course Overview: Testing React Components with Enzyme and Jest
- 02-Install Enzyme and Configure Jest
- 03-Test Against Different React Releases with Enzyme
- 04-Shallow Render a React Component with Enzyme
- 05-Find Nodes from a Shallow Rendered Component
- 06-Understand the Different Accepted Selectors in Enzyme
- 07-Test Enzyme Rendered Components with Jest Snapshots
- 08-Test React Component Props with Enzyme and Jest
- 09-Fully Render React Components with Enzyme
- 10-Test Simulated Event Handlers with Enzyme
- 11-Test New Component State with setState in Enzyme
- 12-Test React Component Lifecycle Methods with Enzyme
- 13-Test React Component Methods with Enzyme
- 14-Test Redux Connect Components with Enzyme
- 15-Testing React Forms with Enzyme
Thanks goes to these wonderful people (emoji key):
Parker Landon 🖋 |
This project follows the all-contributors specification. Contributions of any kind welcome!