1 00:00:06,540 --> 00:00:08,760 - Hello again and welcome to lesson four. 2 00:00:08,760 --> 00:00:11,940 This lesson is all about testing asynchronous code. 3 00:00:11,940 --> 00:00:13,560 This is a really important aspect 4 00:00:13,560 --> 00:00:16,650 in industrial-strength web applications. 5 00:00:16,650 --> 00:00:18,840 We'll begin by testing asynchronous code 6 00:00:18,840 --> 00:00:21,600 that invokes a callback when it's finished. 7 00:00:21,600 --> 00:00:25,500 We'll see how to verify the callback is invoked correctly. 8 00:00:25,500 --> 00:00:28,770 We'll also see how to specify an extended time mode, 9 00:00:28,770 --> 00:00:31,773 which is important if your code is particularly slow. 10 00:00:32,700 --> 00:00:35,850 Next up, we'll see how to test promises. 11 00:00:35,850 --> 00:00:38,460 We'll recap how promises work. 12 00:00:38,460 --> 00:00:40,107 We'll see how to test promises, 13 00:00:40,107 --> 00:00:44,790 and we'll see how to use the async and the await keywords 14 00:00:44,790 --> 00:00:46,560 to simplify how we handle promises 15 00:00:46,560 --> 00:00:49,260 in our code and in our tests. 16 00:00:49,260 --> 00:00:51,030 To finish off the lesson, we'll take a look 17 00:00:51,030 --> 00:00:56,030 at Rxjs, reactive extensions for JavaScript. 18 00:00:56,040 --> 00:01:00,360 This library introduces the concept of observable objects. 19 00:01:00,360 --> 00:01:02,340 We'll explain how to use these 20 00:01:02,340 --> 00:01:06,063 and how to test them in our Jest application tests.