We looked at testing our Angular application in Chapter 7, Testing the Trello Application, where we covered in detail how to write the unit test and how Angular CLI allows us to run and manage our test cases. We created multiple test cases in our components, services, and pipes and then, using the ng test command, were able to run the test in a separate browser.
The Angular CLI also provides some options to configure our test environment with ng test, such as a watch flag which informs the CLI that it should run the test cases automatically when there is some change in the code, or the single-run flag, which allows us to run the test cases only once and not have the test scripts running.
The single-run flag is most useful in CI scenarios where we want to validate our code and not keep running the test cases. We can also choose which browser we want...