Skip to content

Commit

Permalink
Add documentation for reportOpts and watermarks (#121)
Browse files Browse the repository at this point in the history
* Add documentation for reportOpts and watermarks

This documentation will help users who wants to have custom threshold values for HTML reports' colors

* fix format
  • Loading branch information
upendrasoft authored and SBoudrias committed Apr 13, 2017
1 parent be326d1 commit ac8f966
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,34 @@ You can also specify one or more custom reporter objects as items in the array.

See also `require('istanbul').Report.getReportList()`

##### reportOpts
Type: `Object` (optional)
```js
{
dir: './coverage'
}
```

You can also configure separate directory for each report.
```js
{
html: {
dir: './coverage/html',
watermarks: {
statements: [ 50, 80 ],
lines: [ 50, 80 ],
functions: [ 50, 80],
branches: [ 50, 80 ]
}
},
lcov: {dir: './coverage/lcov'},
lcovonly: {dir: './coverage/lcovonly'},
json: {dir: './coverage/json'},
}
```
`watermarks` can be used to confgure the color of the HTML report.
Default colors are.. RED: below 50% coverage, YELLOW: 50-80% coverage, GREEN: above 80%

##### coverageVariable
Type: `String` (optional)
Default: `'$$cov_' + new Date().getTime() + '$$'`
Expand Down

0 comments on commit ac8f966

Please sign in to comment.