Loading
Current section: Testing Asynchronous Code 5 exercises
lesson

Overview of Testing Async Code

Transcript

00:00 Tests are about trust, so whenever you see a failing test, you must be absolutely certain that that's an indication that something is wrong with your code. One thing that can severely undermine your trust in tests is flakiness. It's a state when your tests fail or pass unpredictably. And one of the most contributing factors to flakiness is asynchronicity.

00:19 In other words, things that happen out of order and can introduce race conditions that negatively impact the reliability of your tests. To make things worse, that asynchronicity can come from the code you don't even control, such as third-party dependencies you may be using, but you still need to handle that in your tests. Luckily, in this exercise,

00:37 you will learn to do precisely that. You will write new tests for the grid function that has evolved since the last time you've seen it, and also improve your testing framework to support testing asynchronous code.