Using Jest's Mock Function

Learn to refactor the test from the previous lesson using Jest’s mock function in this lesson.

Starter project

The project for this lesson is the completed project from the last lesson. In this lesson, we’ll refactor the test to use Jest’s mock function.

A copy of the project is in the code widget below. Clicking the “Run” button will execute the tests.

Get hands-on with 1200+ tech skills courses.