From the course: Learning the Angular CLI

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Built-in test runner

Built-in test runner - Angular Tutorial

From the course: Learning the Angular CLI

Start my 1-month free trial

Built-in test runner

- [Instructor] We will now be learning about how to run your tests using the CLI. Go ahead and open the sample application provided in the exercise files called ng-sample-unit-tests. Or you can clone the GitHub repository at this URL and make sure you run NPM install. When you generate an application using the CLI, a testing pipeline is already set up for you. To run your unit test, a karma configuration file is generated. Karma is used as a test runner, using Jasmine as a testing framework and is set up by default to run your tests in Chrome. Additional setup can be seen in source, test.ts. Essentially, this provides additional setup to initialize the angular testing environment. You can write your test entire script and the CLI will take care of transpiring that for you. In the next video we'll be learning more about the ng test command.

Contents