Before running the test, it may be useful to understand a little more about Jasmine and Karma. If you don't know anything about them, don't worry—you will soon. For now, just know that Jasmine is an open source testing framework for JavaScript that can be used to define tests, while Karma is a test runner tool that automatically spawns a web server that will execute JavaScript source code against Jasmine-made tests and output their respective (and combined) results on a command line.
In this quick test, we'll basically launch Karma to execute the source code of our sample Angular app against the Jasmine tests defined by the template in the counter.component.spec.ts file: this is actually a much easier task than it might seem.
Open a Command Prompt, navigate to the <project>/ClientApp/ folder, then execute the following command:
> npm run ng test
This will call the Angular CLI using npm.
Alternatively, we can install the Angular CLI globally...