Skip to content

Commit

Permalink
added section about using istanbul on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetCarpenter committed Nov 24, 2015
1 parent 42f1bb1 commit bf15d79
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* [Features and use cases](#features)
* [Getting started and configuration](#getting-started)
* [Usage on Windows](#usage-on-windows)
* [The command line](#the-command-line)
* [Ignoring code for coverage](#ignoring-code-for-coverage)
* [API](#api)
Expand Down Expand Up @@ -56,6 +57,23 @@ Sample of code coverage reports produced by this tool (for this tool!):

[HTML reports](http://gotwarlost.github.com/istanbul/public/coverage/lcov-report/index.html)

### Usage on Windows

Istanbul assumes that the `command` passed to it is a JS file (e.g. Jasmine, vows etc.),
this is however not true on Windows where npm wrap bin files in a `.cmd` file.
Since Istanbul can not parse `.cmd` files you need to reference the bin file manually.

Here is an example using Jasmine 2:

istanbul cover node_modules\jasmine\bin\jasmine.js

In order to use this cross platform (e.i. Linux, Mac and Windows), you can insert
the above line into the script object in your package.json file but with normal
slash.

"scripts": {
istanbul cover node_modules/jasmine/bin/jasmine.js
}

### Configuring

Expand Down Expand Up @@ -268,4 +286,3 @@ The following third-party libraries are used by this module:

Since all the good ones are taken. Comes from the loose association of ideas across
coverage, carpet-area coverage, the country that makes good carpets and so on...

0 comments on commit bf15d79

Please sign in to comment.