Book Image

Jasmine Cookbook

By : Munish Kumar
Book Image

Jasmine Cookbook

By: Munish Kumar

Overview of this book

Table of Contents (16 chapters)
Jasmine Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

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 application. There are lots of other features associated with Node.js but in the current context, we will use it to get npm. For more details on Node.js, you can visit the following websites: