Angular unit tests are performed with Jasmine that was described in the Testing your library with Jasmine section of Chapter 8, Building TypeScript Libraries. Angular uses Karma to run all tests in a browser, and adds some facilities to handle component compilation, Dependency Injection, and HTML manipulation.
When an Angular entity is generated, Angular automatically generates a test file skeleton to unit test that entity. All existing tests may be run by launching the ng test command in a Windows console rooted in the ClientApp folder. Once the command is activated, the browser opens and Karma displays the results of all tests. Since some tests are incomplete, or not aligned to the modifications done to some components, Karma, for sure, will signal a number of errors. The counter.component.spec.ts file contains tests that should pass, so let's open it. It contains...