Appendix A. Setting up Karma

Karma is a JavaScript test runner created by the AngularJS team. It’s important to note that it’s not a testing framework. It allows you to specify information about your testing environment, such as which browser(s) to use, which files to include, and so on. You then specify which testing framework you want to use (Jasmine, in our case) and write your tests using that particular framework.

Install Node.js and Node Package Manager (npm)

First things first. If you haven’t yet installed Node.js, stop! Here are a couple resources to get the ball rolling:

Install packages

If you do have Node.js and npm, welcome! First, install karma-cli globally ...

Get AngularJS in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.