Testing React With Jest

Jest is a delightful JavaScript Testing Framework with a focus on simplicity. More info

Articles & Tutorials

Writing Tests for React Applications Using Jest and Enzyme (css-tricks.com)
Mar 01, 2019
While it is important to have a well-tested API, solid test coverage is a must for any React application. Tests increase confidence in the code and helps prevent shipping bugs to users. That’s why we’re going to focus on testing in this post, specifically for React applications. By the end, you’ll be up and running with tests using Jest and Enzyme.
  • Kingsley Silas
Jest 24: Refreshing, Polished, TypeScript-friendly (jestjs.io)
Jan 25, 2019
Today we are happy to announce the next major release of Jest - version 24! It's been 4 months since the last minor release, and 8 months since Jest 23, so this upgrade is a big one, with something for everyone!
  • Simen Bekkhus
Testing React components (flaviocopes.com)
Jan 05, 2019
Test your first React component using Jest and `react-testing-library`
How to set up Jest & Enzyme like a boss (medium.freecodecamp.org)
Nov 12, 2018
When I started out writing tests for my React application, it took me some tries before I figured out how to set up my testing environment using Jest & Enzyme.
  • Adeel Imran
Components testing in React: what and how to test with Jest and Enzyme (medium.freecodecamp.org)
Oct 03, 2018
Testing React components may be challenging for beginners as well as experienced developers who have already worked with tests. It may be interesting to compare your own approaches with the ones we use in our project. In order to cover the codebase, you have to know which components must be tested and which code exactly in the component should be covered.
  • Alyona Pysarenko
How to Test React Components using Jest and Enzyme (blog.bitsrc.io)
Sep 26, 2018
Learn how to test React components using Jest and Enzyme
  • Linh Nguyen My
Reactjs Unit Testing with Storybook + Jest (blog.cloudboost.io)
Sep 23, 2018
Reactjs is a UI library by facebook while Storybookjs is a testing tool for components by representing different states of the component and Jest is another cool unit testing tool by the creators of reactjs for javascript including reactjs.
  • Danstan Onyango
Testing Components in React Using Jest and Enzyme (code.tutsplus.com)
Aug 17, 2018
In this post, we'll get a deeper understanding of testing components in React by writing more practical and realistic tests.
  • Manjunath M
Testing Components in React Using Jest: The Basics (code.tutsplus.com)
Aug 10, 2018
In this article, I will take you through everything that you need to know to write tests for your React components. I'll also cover some of the best practices and techniques while we're at it.
  • Manjunath M
Demystifying Jest Async Testing Patterns (medium.com)
Aug 09, 2018
In this post I’d like to demystify some of these async patterns and highlight the traps that are hidden inside.
  • Liran Tal
Testing React / Redux Apps with Jest & Enzyme - Part 2: Testing React Components (alligator.io)
Jun 03, 2018
In this part we’ll cover some simple examples on how to test React components.
  • Jasper Valero
Testing React / Redux Apps with Jest & Enzyme - Part 1: Installation & Setup (alligator.io)
May 20, 2018
Learn how to install and setup Jest and Enzyme for testing React.
  • Jasper Valero
End-to-end testing React apps with Puppeteer and Jest (blog.logrocket.com)
May 09, 2018
In this tutorial, we’ll see how to write tests for a React app using Jest and Puppeteer. Testing is an important part of modern web application development, it helps to check if the code you wrote is acceptable and works as accepted. It’s a way of catching bugs in your code before you go “live”.
  • Yomi Eluwande
Testing your React App with Puppeteer and Jest (blog.bitsrc.io)
May 07, 2018
How to use Puppeteer and Jest to perform End-to-End Testing on your React App
  • Rajat S
React Testing Tutorial: Test Frameworks & Component Tests (robinwieruch.de)
Mar 19, 2018
A React tutorial on how to setup and use React component tests with testing frameworks such as Mocha, Chai, Sinon, Enzyme and Jest.
Tutorial: User Interface Testing with Jest and Puppeteer (valentinog.com)
Mar 11, 2018
I started to consider testing with Jest and Puppeteer right after the library came out. Puppeteer has quite an interesting API.
  • Valentino Gagliardi
Understanding Jest Mocks (medium.com)
Mar 08, 2018
Recently, I joined Jest as a collaborator to help triage the issue tracker, and I’ve noticed a lot of questions about how mocking in Jest works, so I thought I would put together a guide explaining it.
  • Rick Hanlon II
Debugging a Create React App with VS Code (elijahmanor.com)
Feb 05, 2018
In this post we’ll look at how to configure Visual Studio Code to debug React Components and Jest Unit Tests inside a web application that was created by create-react-app.
  • Elijah Manor
Testing in React Native  -  Jest & Detox (pillow.codes)
Sep 08, 2017
Writing unit & end-to-end tests to ship your mobile app with confidence.
  • Monte Thakkar
Snapshot Testing React with Jest (daveceddia.com)
Apr 05, 2017
Testing is a double-edged sword. On one hand, having a solid test suite makes code easier to refactor, and gives confidence that it works the way it should. On the other hand, tests must be written and maintained. They have a cost, like any other code.
Testing React Applications with Jest (auth0.com)
Jan 26, 2017
Learn how to test React applications with the Jest JavaScript testing framework.
  • Joyce Echessa

Video Guides & Talks

How to make Jest run anything (youtube.com)
Jan 11, 2019
This is to show how my custom jest-node-runner works.
Jest Architecture (youtube.com)
Nov 20, 2018
This overview by Christoph Nakazawa, Rick Hanlon II and Rubén Norte explains the basic architecture of Jest and what it takes to run a single test.
  • Christoph Nakazawa
Effective unit testing (youtube.com)
Nov 15, 2018
True units are awesome to test!
Use jest's expect module without jest (youtube.com)
Nov 14, 2018
James Long tweeted about how you can do this and I thought it'd be cool to share :)
Debug Jest Tests (youtube.com)
Aug 09, 2018
Sometimes it's just really nice to step through your code line-by-line. Here we'll cover how you can run your jest tests in Chrome's DevTools using node --inspect-brk.
Make jest run anything (youtube.com)
Jun 20, 2018
Jest is more than a testing framework. It's a platform. And you can make it run just about anything for you.
Jest Crash Course - Unit Testing in JavaScript (youtube.com)
Apr 20, 2018
In this video we will get started with JavaScript unit testing using Jest. We will look at how to setup Jest, different matchers as well as how to test async code, run functions before and after different tests, etc.
Mocking Axios in Jest + Testing Async Functions (youtube.com)
Apr 13, 2018
In this video we'll look at a function that makes an HTTP request using the axios library to the Unsplash API and figure out how we can test it using a fake/mock version of axios to avoid performing real HTTP requests. We will be using Jest and some mocking functionality that it provides.
What Is Jest? (youtube.com)
Apr 11, 2018
In this video, I answer the question, what is Jest?
Testing Asynchronous Components with Mocks in Jest (youtube.com)
Apr 06, 2018
In this video we'll cover how to test React components that contain asynchronous code using mocks in Jest. We'll refactor our component to make it more easily testable and mockable, allowing the test to run without making an actual AJAX request.
JS Testing 101 with Jest (youtube.com)
Apr 03, 2018
In this series, we'll cover the skills needed to understand the how and why of JavaScript testing.
Getting started with testing in React (youtube.com)
Mar 29, 2018
In this video we talk about how to test components in React within create-react-app, how to configure Jest with Enzyme and Sinon, how to test with snapshots, simulate clicks, and interact with DOM elements through Enzyme.
Debugging a Create React App with VS Code (youtube.com)
Feb 05, 2018
In this post we’ll look at how to configure Visual Studio Code to debug React Components and Jest Unit Tests inside a web application that was created by create-react-app.
Testing API Contracts with Snapshots (youtube.com)
Dec 04, 2017
Dave Ceddia talks about using Jest's snapshot testing to verify your APIs are working as expected.
JavaScript & React Testing with Jest (youtube.com)
Sep 08, 2016
Jest has become one of the coolest things in testing JavaScript and React. In recent months, the Jest team has made huge strides with the testing framework and it's a pretty amazing tool.

Courses & Video Series

React Recipes (lynda.com)
Jul 16, 2018
This course provides tested, easy-to-follow instructions to solve the most common challenges that React developers face every day
  • Diego Muracciole
Testing React Applications, v2 (frontendmasters.com)
May 13, 2018
Learn to catch errors before they reach the end user with automated tests!
Testing React Applications with Jest (pluralsight.com)
May 10, 2018
This course will teach you basic and intermediate Jest testing techniques, including running tests, snapshot testing, testing React components, and module mocking.
Test React Components with Enzyme and Jest (egghead.io)
May 09, 2018
In this course we are going to work through properly setting up Enzyme with Jest to test rendered components.
  • Tyler Clark
Testing React with Enzyme and Jest (javascriptplayground.com)
Feb 12, 2018
A video series to enable you to test React components thoroughly, refactor with confidence and abstract logic out of components
React: Testing and Debugging (lynda.com)
Jul 05, 2017
Learn how to test, debug, and optimize your React code with tools like Jest, Chrome, ESLint, and flow.
Testing JavaScript Applications (feat. React and Redux) (frontendmasters.com)
Jun 20, 2017
Create automated testing so you can be sure you’re maintaining the highest quality JavaScript applications possible!


jest (jestjs.io)24375
Apr 04, 2019
Delightful JavaScript Testing
  • Christoph Nakazawa
  • Simen Bekkhus
  • Aaron Abramov
  • Facebook