Chapter 10 – Unit Testing React with React Testing Library
- React Testing Framework
- Features
- Snapshot Testing
- Code Coverage
- Interactive Mode
- Projects created with create-react-app
- Default App Component Test
- Unit Tests
- Anatomy of a Unit Test
- Common Matchers
- Combining Tests
- Running Tests
- Testing Promise based async code with ‘done’
- Setup and Teardown
- react-testing-library
- A Simple Component Test
- A Simple Snapshot Test
- Running and Updating SnapShot Tests
- Building Component Tests
- Calling Render
- Render Properties
- Simulating Events
- Testing Results
- Using Query Functions
- Text Matching
- Counter Component
- counter-test.js
- Summary