2021 Update! React Testing with Jest and Enzyme
MP4 | Video: h264, 1280x720 | Audio: AAC, 44100 Hz
Language: English | Size: 5.95 GB | Duration: 15h 4m
MP4 | Video: h264, 1280x720 | Audio: AAC, 44100 Hz
Language: English | Size: 5.95 GB | Duration: 15h 4m
Improve your React, Redux, Hooks and Context Code with Test Driven Development
What you'll learn
Write unit, integration and functional tests for React, Hooks, Contex and Redux using Jest and Enzyme.
Know the tradeoffs for different testing approaches and when to choose which approach.
Plan your React app more effectively via Test Driven Development.
Mock methods and modules to keep your tests isolated.
Requirements
Basic Familiarity with JavaScript and React
Description
Take your React code to the next level by learning Test Driven Development (TDD) with Jest and Enzyme! Jest is a powerful, flexible testing framework, and Enzyme provides tools to test React and Redux applications. In this course, you will learn to test:
React hooks, including useEffect, useState and useReducer
Asynchronous functions using Axios
Redux action creators and reducers
Complex Redux action creators that use Redux Thunk
React context, including context with embedded state
You will also learn how to make the most of Jest capabilities, including
Mocking and restoring individual properties of modules
Mocking entire modules
Controlling which tests run using, .skip, and .only
Running test suites multiple times with different data, using .each
Please Note: This course does not cover Jest snapshots, as they are not compatible with the TDD mode of testing.
Why Learn to Test?
Test Driven Development will help you write better organized code that’s easier to maintain, which will save you time in the long run. Your tests provide value to your software development team, since others know they can rely on your code. Employers want developers with testing skills!
Unit tests and Functional Tests
This course focuses on unit tests. Unit tests are tightly coupled to specific areas of code, which leads to easy diagnosis of failures, and a great match for Test-Driven Development. The course also teaches functional tests, which are modeled on user flows (and resulting behavior from the user perspective). Functional tests are not connected to code, which makes them more difficult to diagnose, but more resilient to code refactors.
Learn the Reasons behind the Syntax
This course discusses tradeoffs when considering different approaches to testing, leaving you confident in the testing choices you make. Furthermore, you will deepen your understanding of React, Redux and Context as we dig into how and why we test each aspect.
Practice your New Skills
You will also have opportunities to practice what you’ve learned. There are occasional “quizzes” while we’re building the course projects, where you can apply what you learned, and then watch a video to see the solution. There are also two sets of challenges to extend the course projects, with solutions on GitHub.
Who this course is for:
Web developers interested in improving their React apps with testing