https://github.com/holyshared/mocha-tcov-reporter
Simple code coverage reporter for mocha
https://github.com/holyshared/mocha-tcov-reporter
Last synced: 11 months ago
JSON representation
Simple code coverage reporter for mocha
- Host: GitHub
- URL: https://github.com/holyshared/mocha-tcov-reporter
- Owner: holyshared
- License: mit
- Created: 2015-01-16T07:11:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-07T08:45:13.000Z (over 10 years ago)
- Last Synced: 2025-07-01T12:09:26.309Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 214 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mocha-tcov-reporter
========================
This reporter is a simple code coverage reporter.
Will display the results in a list.
[](http://badge.fury.io/js/mocha-tcov-reporter)
[](https://travis-ci.org/holyshared/mocha-tcov-reporter)
[](https://coveralls.io/r/holyshared/mocha-tcov-reporter?branch=master)
[](https://codeclimate.com/github/holyshared/mocha-tcov-reporter)
[](https://david-dm.org/holyshared/mocha-tcov-reporter)
Installation
------------------------------------------
npm install mocha-tcov-reporter --save-dev
Basic Usage
------------------------------------------
Add a set of [blanket](https://github.com/alex-seville/blanket) to package.json.
```json
"config": {
"blanket": {
"pattern": "/lib/",
"data-cover-never": "/node_modules/"
}
}
```
After that, You need to specify the reporter.
mocha -r blanket -R mocha-tcov-reporter test
Multi Reporter
------------------------------------------
With [mocha-multi](https://github.com/glenjamin/mocha-multi), you can view the report along with the test results.
In the example below, we have used in conjunction with the spec reporter.
multi='spec=- mocha-tcov-reporter=-' mocha -r blanket -R mocha-multi test