Writing your first test in Deno
Before we start writing our test, it's important to remember a few things. The most important of them is, why are we testing?
There might be multiple answers to this question, but most of them will gesture toward guaranteeing that the code is working. You might also say that you use them so that you have flexibility when it comes to refactoring, or that you value having short feedback cycles when it comes to implementation – we can agree to both of these. Since we didn't write a test before implementing these features, the latter doesn't apply too much to us.
We'll keep these objectives in mind throughout this chapter. In this section, we'll write our first test. We'll use the application we wrote in the previous chapters and add tests to it. We'll write two types of tests: integration and unit tests.
Integration tests will test how different components of the application interact. Unit tests test layers...