There are two runners to execute tests:
- HTML runner from the Jasmine's standalone distribution (https://github.com/jasmine/jasmine/releases): Download the ZIP file, unzip it, and open the SpecRunner.html file in any text editor. This HTML file includes some base code that loads the test framework. You need to add regular Angular dependencies, an Angular testing library, and a SystemJS loader, which loads the .spec files. After that, you can open the HTML file in your web browser to see the test results.
- Command-line runner Karma: Karma can run tests in different browsers and report possible errors with various reporters. The runner can be integrated into the build process so that the unit tests get executed automatically as a part of the build.
In this book, we will only concentrate on the Karma runner. The Webpack-based project setup needs the following Karma dependencies:
"devDependencies": {
...
"karma": "~1.7.0...