- Hello again, and welcome to lesson five.
This is the first of two lessons on mocking.
We begin by showing how to define a mock function in Jest
and how to use the mock property to gain insight
into how the mock function was called by our code.
Then we'll see how to use mock functions to mock an API
and how to mock all the functions
in an entire JavaScript model.
To wrap up the lesson, we'll see how to test promises
and show how to use these techniques to mock REST calls.