React Testing Library and Jest: The Complete Guide
- Offered byUDEMY
React Testing Library and Jest: The Complete Guide at UDEMY Overview
Duration | 8 hours |
Total fee | ₹399 |
Mode of learning | Online |
Credential | Certificate |
React Testing Library and Jest: The Complete Guide at UDEMY Highlights
- 30-Day Money-Back Guarantee
- Certificate of completion
- Full lifetime access
- Learn from 56 downloadable resources and 10 articles
React Testing Library and Jest: The Complete Guide at UDEMY Course details
- Everything you need to know about testing React Components using React Testing Library and Jest
- Understand how to simulate user events and data fetching in a test environment
- Verify your components the way your components work - before deploying them!
- Get practical, hands-on experience adding tests to a large React project
- Explore hidden aspects of testing that aren't covered in any other testing course
- Save time by building your own custom Jest matchers
- Focus on learning why best practices exist - and when to break them!
- Congratulations! You've found the most popular, most complete, and most up-to-date resource online for learning how to test React apps with React Testing Library and Jest!Thousands of other engineers have learned how to test, and you can too. This course uses a time-tested, battle-proven method to make sure you understand exactly how testing works, and will get you a new job working as a software engineer or help you build that app you've always been dreaming about.The difference between this course and all the others: you will understand the design patterns used by top companies to test the largest React apps around.Testing is used to verify your code works as expected. This provides a set of unique benefits to any frontend:Author smaller, easier to understand codebasesDeploy your code with confidence that it will behave correctlyTest each portion of your app separately - limit the chance of interrupting your usersAllow each of your engineering teams to work independentlyChange your codebase without worrying about breaking an existing featureTesting is a popular topic, but there is a lot of misinformation online. This course has been developed with input from top engineers to ensure total technical accuracy.What will you build?This course focuses on testing components in a variety of different environments. You will begin by writing tests for a small mini-project, just to get some quick initial experience. From there, you'll learn about React Testing Library and all of its functionality by building a series of interactive cheatsheets. You can use these cheatsheets as a future reference to easily remember the intricacies of testing. Finally, you'll add tests to a rather large React app, complete with authentication, data fetching, and navigation.Here's a partial list of some of the topics you'll cover:Customize your test environment by writing custom Jest matchersLearn how to debug your tests by fixing many bugsRun tests faster by implementing a fake data-fetching processUnderstand best practices by working on a large React projectSee an exhaustive list of all the functionality packed into React Testing LibraryEnhance your element-selecting powers by using the ARIA Role systemGet experience testing authentication and routingWrite more efficient tests by learning dozens of testing shortcutsFinally understand the most mysterious function in React - the 'act' function!Learn multiple ways of handling third-party libraries in a test environmentUse Jest to 'mock' functions and librariesI spent the early years of my software engineering career writing tests non-stop. Every single day, I practiced Test Driven Development to write thousands of lines of code while being mentored by top industry engineers. Let me share this knowledge with you. Testing is one of the topics I am most passionate about, and I want you to get as excited as I am. Sign up today and join me!
React Testing Library and Jest: The Complete Guide at UDEMY Curriculum
Dive In - Let's Get Started!
How to Get Help
Start Testing... Now!
A Few Critical Questions
Join Our Community!
A Whirlwind Overview of Testing
Project Setup
Quick Note
Adding the Form
Handling User Input
Rendering the List of Users
Completed Users Project
Our First Test
Element Query System
Understanding ARIA Roles
Understanding Jest Matchers
test was not wrapped in act(...) Warning and Test Failure
Simulating User Events
Recording Function Calls
Introducing Mock Functions
Querying Elements by Labels
Testing the UserList
Getting Help with Query Functions
Query Function Escape Hatches
Another Query Function Fallback
Testing Table Contents
Avoiding BeforeEach
Reminder on Async Await and act Warnings
Testing the Whole App
A Touch of Test Driven Development
Feature Implementation
Understanding Element Roles
Introducing RTL Book
A Few Notes on RTL Book
Partial Role List
Finding Elements by Role
Finding by Accessible Names
Linking Inputs to Labels
Directly Assigning an Accessible Name
Completed Roles Notebook
Finding Elements with Query Functions
Deeper into Query Functions
GetBy, QueryBy, FindBy
More on Single Queries
Multiple Element Variations
When to use These Queries
When to use Async Queries
Completed Queries Notebook
Query Function Suffixes
Query Criteria
When to Use Each Suffix
Completed Criteria Notebook
Matchers in Jest
Diving into Matchers
Introducing Custom Matchers
Implementing a Custom Matcher
Big Project Overview
Required Project Setup - Do Not Skip
App Overview and Setup
The Tech in This Project
The Path Ahead
A Process for Debugging
Understanding Data Flowing Into the Component
Developing a Test and a Fix
Looping Over Assertions
Flexible Queries
The Mysterious 'Act' Function!
Another Bug!
Analyzing the Data... Again!
Adding Router Context
Unexpected State Updates
Act Included with React Testing Library
Using Act (Hopefully Not!) with RTL
Solving the Act Warning
Module Mocks
Absolute Last Ditch Act Solution
Checking the Link Href
Implementing the Feature
Checking the Icon
Checking the Link
Handling Data Fetching in Tests
Easy Fix, Hard Test
Options for Testing Data Fetching
Using a Request Handler
Initial MSW Setup
Inspecting the Component State
Effective Request Testing
An Issue with Fake Handlers
Easier Fake Routes - Here's the Goal
Making a Reusable Create Server Function
Tests Around Authentication
Testing Authentication
Understanding the Auth API
Order of Execution
Scoping Test Hooks
Act Warnings... Again!
Assertions Around Auth Links
Wait... It Doesn't Work!?
Limiting Test Execution
Using Debuggers in Tests
Test Debugging in Action
One Last Debugging Hint
It Is a Caching Issue!
Solving the Caching Issue
Bonus!
Bonus!