Skip to content

Commit

Permalink
stopped doing something silly I was doing with environment variables,…
Browse files Browse the repository at this point in the history
… updated README to explain how exlude works
  • Loading branch information
Benjamin Coe committed May 20, 2015
1 parent 57f1c34 commit 2f1fe87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ you can use any reporters that are supported by istanbul:
nyc report --reporter=lcov
```

## Excluding Files

By default nyc does not instrument files in `node_modules`, or `test`
for coverage. You can override this setting in your package.json, by
adding the following configuration:

```js
{"config": {
"nyc": {
"exclude": [
"node_modules/"
]
}
}}
```

## Integrating With Coveralls

[coveralls.io](https://coveralls.io) is a great tool for adding
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ NYC.prototype._wrapExit = function () {
}

var opts = {alwaysLast: true}
// we're running as a unit test.
if (process.env.TAP) opts.maxListeners = 2
// allow more signal handlers in unit tests.
if (process.env.NYC_TEST) opts.maxListeners = 2
onExit(function () {
outputCoverage()
}, opts)
Expand Down

0 comments on commit 2f1fe87

Please sign in to comment.