1 00:00:06,630 --> 00:00:09,300 - Hello again, and welcome to Lesson 6. 2 00:00:09,300 --> 00:00:11,850 In this lesson, we'll take a closer look at mocking 3 00:00:11,850 --> 00:00:12,810 in Jest. 4 00:00:12,810 --> 00:00:15,930 We'll begin by discussing the concept of spies. 5 00:00:15,930 --> 00:00:19,560 A spy is a just construct that enables you to observe 6 00:00:19,560 --> 00:00:21,753 how function is invoked by your code. 7 00:00:22,650 --> 00:00:25,260 Next, we'll see how to mock timers. 8 00:00:25,260 --> 00:00:28,020 This enables you to emulate the passage of time 9 00:00:28,020 --> 00:00:32,490 so your tests can run more quickly when they involve timers. 10 00:00:32,490 --> 00:00:34,620 The last few sections in this lesson 11 00:00:34,620 --> 00:00:37,890 are all about how to test ECMAScript classes. 12 00:00:37,890 --> 00:00:39,780 So first, we'll begin with a quick recap 13 00:00:39,780 --> 00:00:41,940 of how to define ECMAScript classes 14 00:00:41,940 --> 00:00:46,290 and then we'll see how to mock a class using automatic mocks 15 00:00:46,290 --> 00:00:48,003 and using manual mocks.