Test-driven Development with React
Gain insights into Test-driven Development with React. Learn unit and integration testing using Jest and Enzyme, and explore tools like ESlint, Prettier, Babel, Webpack, and Travis CI.
Andy Hunt and Dave Thomas founded The Pragmatic Programmers, LLC., with a simple goal: to improve the lives of professional developers. We create timely, practical books and other learning resources on classic and cutting-edge topics to help you learn and practice your craft and accelerate your career. We are not a giant, faceless, greed-soaked corporation. We’re a small group of experienced professionals committed to helping make corporate software development—and your life—easier.
Join 3.1 million developers at
What You'll Learn
- Apply the red-green-repeat TDD cycle to develop and refactor React code with rapid feedback
- Set up a Node/npm project and run Jest via npx and npm scripts with lockfiles for consistency
- Write and run Jest unit tests using suites, assertions, watch mode, and coverage flags
- Configure VS Code with ESLint, Prettier, and Wallaby for live linting, formatting, and test feedback
- Build and test React components with Enzyme (shallow/mount), including props, children, and state
- Test styled-components using jest-styled-components, style assertions, and Jest snapshot testing
- Implement and test higher-order components and the controllable pattern, including mocked timers
Learning Roadmap
1.
Before We Begin
Before We Begin
2.
Test-Driven Development with Jest
Test-Driven Development with Jest
3.
Integrated Tooling with VS Code
Integrated Tooling with VS Code
10 Lessons
10 Lessons
4.
Testing React with Enzyme
Testing React with Enzyme
11 Lessons
11 Lessons
5.
Styling in JavaScript with Styled-Components
Styling in JavaScript with Styled-Components
11 Lessons
11 Lessons
6.
Refactoring with Higher-Order Components
Refactoring with Higher-Order Components
7 Lessons
7 Lessons
7.
Continuous Integration and Collaboration
Continuous Integration and Collaboration
7 Lessons
7 Lessons
The Pragmatic Programmers
We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.
Trusted by 3.1 million developers working at companies
Anthony Walker
@_webarchitect_
Evan Dunbar
ML Engineer
Software Developer
Carlos Matias La Borde
Souvik Kundu
Front-end Developer
Vinay Krishnaiah
Software Developer
Built for 10x Developers












Free Resources