Testing React.js Applications with Jest A Complete Introduction to Fast, Easy Testing

  • Gigi Sayfan

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

You're watching a preview of subscription content. Log in to check access

Learn how to use Jest by viewing easy-to-follow screencasts accompanied by clear instructions. In this complete video introduction to Jest, the testing framework from Facebook, you’ll discover how Jest can test any JavaScript application, and that it is widely used to test React.js applications. Testing React.js Applications with Jest will lay out the entire process, allowing you to see Jest in action with your own eyes.

You’ll see that comprehensive testing of JavaScript-based web applications is a significant task, and many of the solutions that have emerged over the years have been cumbersome and involved integrating many different tools. With the help of this video you’ll replace these multiple tools and create a fast, comprehensive service that supports advanced features such as snapshots. Along the way you’ll learn how to build Jest into applications using create-react-app.

This video course will cover Jest performance, ease of use and configuration, mocking and advanced features - it is a comprehensive guide to the framework that will make testing React.js applications a breeze.

What You Will Learn

  • Use Jest effectively to test React.js applications using best practices

  • Integrate testing into your current development process

  • Make your tests easy to set up and fast

  • Work with the advanced capabilities of Jest without additional dependencies

Who This Video Is For

Web developers interested in best practice and improving the quality of their code and overall systems without introducing friction into their development process.

About The Author

Gigi Sayfan

Gigi Sayfan is a principal software architect at Helix, a bioinformatics and genomics startup, and is passionate about sharing his knowledge, experience and enthusiasm with other developers. He has been developing software professionally for more than twenty years in domains as diverse as instant messaging, morphing, chip fabrication process control, embedded multimedia applications for game consoles, brain-inspired machine learning, custom browser development, web services for 3D distributed game platforms, IoT sensors, and virtual reality.

He has written production code in many programming languages, and grew up with the web, starting with simple HTML and dynamic HTML for Netscape Navigator and IE4. He has enjoyed watching the web platform grow and evolve as CSS and JavaScript have become real enablers, and he has developed tools, tests and production code using web technologies for two decades. These days he’s excited about modern frameworks, including React, and the ecosystem around them.


About this video

Gigi Sayfan
Online ISBN
Total duration
1 hr 2 min
Copyright information
© Gigi Sayfan 2019

Video Transcript

Welcome to testing react applications with Jest. In this section, I’ll introduce the course, we’ll talk about the agenda, a little bit about myself, the demo app that we will be testing, and, finally, the course goals, and what you can expect to get out of it. We have a packed agenda. Are you excited? I know I am.

We will start talking about automated testing in Jest, how to install and configure Jest. We’ll move on to some basic testing with Jest. Then we’ll do mocking, coverage reports with Jest. We will do snapshot testing and, finally, some delta testing.

Hi, everyone. My name is Gigi Sayfan, and I will be your host. I am currently the DevOps team manager at Helix, a consumer genomics startup. I’ve been writing code for more than 24 years now. I spent most of my career at startups, but also a couple of big companies, like Sony PlayStation and Amdocs. I wrote hundreds of technical articles and a couple of books too. I also like to contribute to open source, and you can see my GitHub and GitLab account listed down there. In my spare time, I like to play basketball, do crossfit, and, these days, I focus on Brazilian jiu jitsu.

Let’s talk about the Rumble, the demo application. Rumble is an online chat service. It was developed by my son, Saar, with a little help from me. It has a Python server as a backend and the react application is a client. During the course, we will add tests to the react client. Since Saar is actively developing the Rumble application, I created the fork with the course code that will always be in sync.

At the end of this course, you will know enough Jest to be dangerous. You will understand how Jest compares to other testing options and be able to explain the differences. You will install and configure Jest and integrate it into your development process. You will write various kinds of tests like unit tests, component tests, and integration tests using Jest. And you’ll also be able to benefit from more advanced features, like coverage reports, snapshot testing, and delta testing.