Unit Testing Angular Applications
In the previous chapters, we went through many aspects of how to build an Angular enterprise application from scratch. But how can we ensure that an application can be maintained in the future without much hassle? A comprehensive automated testing layer can become our lifeline once our application begins to scale up and we have to mitigate the impact of bugs.
Testing, specifically unit testing, is meant to be carried out by the developer as the project is being developed. Now that our knowledge of the framework is mature, we will briefly cover all the intricacies of unit testing an Angular application in this chapter including the use of testing tools..
For simplicity, the examples in this chapter are not related to the e-shop application that we have built throughout the book.
In more detail, we will learn about the following:
- Why do we need unit tests?
- The anatomy of a unit test
- Introducing unit tests...