Using Jest's spyOn Function

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 spyOn function.

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

Get hands-on with 1200+ tech skills courses.