Summary
In this chapter, we learned how to perform tests in an Angular project. We studied what types of tests there are, their importance, and how to apply them in our daily lives. We worked on our project by first creating tests for the services and looking at how to isolate the dependencies for a unit test. Furthermore, we explored testing HTTP requests using the HttpClientTestingModule
module. We learned about the TestBed
component and its important task of setting up the environment for each unit test to run. We also looked at component testing and how to assert components that use routes. Finally, we explored E2E tests with the Cypress tool, which simplifies the creation of scripts that simulate the behavior of our application from the client’s point of view.
In the next chapter, we will explore the concept of the micro frontend using the Angular framework.