React testing

Testing react applications with Jest and React Testing Library
React testing
File Size :
31.48 MB
Total length :
4h 51m



Krystian Czekalski


Last update




React testing

What you’ll learn

Testing React application
Jest framework
React Testing Library

React testing


Knowing React framework


This course is not just a theory and bullet points about testing React. In this course, we test real application and you will gain not just knowledge but also practice.We will focus on testing web application in React. I will explain why it’s worth testing and what tools we should pick for testing react application. We will be talking about many different aspects of testing: Unit tests, integration tests, snapshots, test runner, describe, before and after tests, skip tests, loops, matchers, truthy and falsy, render component, fire event, mocking, fetching API, act, wait and many more. After this tutorial, you will be able to handle many obstacles with testing the dynamic applications in React. We will write a lot of different tests to cover different technics and ways to select certain elements and interact with them. The first tool that we will learn will be Jest. I will show you how to run tests and write them. At this level, we will write tests without React application. We will focus on Jest only and use it as our test runner.After we will know what is Jest and how it works, we will install our first application with React Testing Library. I will show you how that library works and what options do we have with it. We will render our components and we will trigger different events.The main section of this tutorial will be testing the real React app. We will have a ready app, written in React and we will start using different technics to test our components. We will be using the newest trends in React like hooks with useState and useEffect. When you finish that chapter, you will know what kind of problems you might have when writing your own tests for React and more importantly, how to solve them with Jest and React Testing Library.


Section 1: Introduction

Lecture 1 Testing tools

Lecture 2 Setting up environment

Section 2: Jest

Lecture 3 Test runner

Lecture 4 Keywords

Lecture 5 Testing variables and functions

Lecture 6 Before and after tests

Lecture 7 Skip, only and timeout

Lecture 8 Loops in tests

Lecture 9 Matchers

Lecture 10 Truthy and Falsy

Lecture 11 Testing errors

Section 3: React Testing Library

Lecture 12 Introduction to react testing library

Lecture 13 Component test

Lecture 14 First test with render

Lecture 15 Information available on the element

Lecture 16 Methods to select elements

Lecture 17 Fire event

Lecture 18 Changing state

Section 4: Testing real app

Lecture 19 Installing the app

Lecture 20 Preparing tests for component

Lecture 21 Snapshot

Lecture 22 Should display text

Lecture 23 Checking ratings

Lecture 24 Testing mouse events

Lecture 25 Mocking

Lecture 26 Testing form elements

Lecture 27 Input values

Lecture 28 SpyOn and wait

Lecture 29 Mock fetch

Lecture 30 Mock function arguments

Lecture 31 Testing parent component

Lecture 32 Act function

Lecture 33 Testing errors

Lecture 34 Testing list and button

Lecture 35 Clicking on elements

Section 5: Summary

Lecture 36 Next steps

React Developers

Course Information:

Udemy | English | 4h 51m | 31.48 MB
Created by: Krystian Czekalski

You Can See More Courses in the Developer >> Greetings from

New Courses

Scroll to Top