Configuring code coverage tools

In this recipe, you will learn how to configure the code coverage tools istanbul and karma using npm.

istanbul is a good JavaScript code coverage tool that computes statement, line, function, and branch coverage. It supports all JavaScript coverage use cases including unit tests, server-side functional tests, and browser tests. For more details, you can visit the following website:

https://github.com/gotwarlost/istanbul

karma is a test runner that generates a code coverage report using istanbul. For more details, you can visit the following website:

https://github.com/karma-runner/karma-coverage

npm is the package manager for JavaScript. It comes with Node.js. Node.js is an open source server-side and networking ...

Get Jasmine Cookbook 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.