O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installation

First though, let's install Karma. We are going to install Karma using npm. Karma basically has two components: Karma itself, which uses Node.js, and the Karma Command Line Interface (CLI). We are going to install Karma in our project folder and we can install the CLI globally for easy access from the command line:

npm install karma --save-dev
npm install karma-cli -g

Optionally, you can use Yeoman, but we will not use the defaults for now, so that is pretty useless at this point. However, if you really want to, you can:

npm install generator-karma -g
yo karma
npm install karma-cli -g

Karma is all about configuration. Now that we have the Karma CLI tool installed, we can easily generate a configuration file. Just use karma init ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required