In this chapter, we'll explore some ideas about software testing. Then, we'll see how we can write tests for our WorldExplorer project using the TypeScript and JavaScript testing libraries. For any real-world application, we should really start thinking about the quality and reliability of our code as early as possible in the development life cycle.
So far in the book, we've tried to raise your awareness about defensive programming techniques, and we have even added runtime type checks to go further, but it is still far from enough!
If you develop applications as we have done so far in the book, then before long you'll most probably end up with unmaintainable and very brittle code. We have approached the different subjects covered so far from an implementation point of view in order to focus on the TypeScript language and its usage,...