- Hello again, and welcome to Lesson 6.
In this lesson, we'll take a closer look at mocking
in Jest.
We'll begin by discussing the concept of spies.
A spy is a just construct that enables you to observe
how function is invoked by your code.
Next, we'll see how to mock timers.
This enables you to emulate the passage of time
so your tests can run more quickly when they involve timers.
The last few sections in this lesson
are all about how to test ECMAScript classes.
So first, we'll begin with a quick recap
of how to define ECMAScript classes
and then we'll see how to mock a class using automatic mocks
and using manual mocks.