Running Tests Using the Angular CLI
Let's explore how we can run tests using the Angular CLI.
We'll cover the following
Command to run tests
To run the tests within an Angular application, we can simply use a single command to the Angular CLI:
ng test
This will begin the process of starting Karma, launching the browser, and finding and running all the test specs we have in our code base. Then, within the same Terminal window, we will see the outcome of the tests and if they have passed or failed.
📝 Note: Press the RUN button to run the
ng test
command. Once the test runs, click on the URL given afterYour app can be found at
, and see what happens!
Get hands-on with 1400+ tech skills courses.