Skip to content

Commit 6d65d16

Browse files
committed
support Custom Reporter
1 parent 7df3bec commit 6d65d16

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22

3+
* 2.3.0
4+
- added support for custom reporter
5+
- added support for wrapper script mapping
6+
37
* 2.2.2
48
- added codecov report
59

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@ console.log(coverageResults.summary);
115115
- v8 custom reporter
116116
> example: [./test/custom-v8-reporter.js](./test/custom-v8-reporter.js)
117117
118+
### Multiple Reports:
118119
```js
119120
const MCR = require('monocart-coverage-reports');
120121
const options = {
121122
outputDir: './coverage-reports',
122123
reports: [
124+
// build-in reports
123125
['console-summary'],
124126
['v8'],
125127
['html', {
@@ -128,7 +130,18 @@ const options = {
128130
['json', {
129131
file: 'my-json-file.json'
130132
}],
131-
'lcovonly'
133+
'lcovonly',
134+
135+
// custom reports
136+
// Specify reporter name with the NPM package
137+
["custom-reporter-1"],
138+
["custom-reporter-2", {
139+
type: "istanbul",
140+
option: "value"
141+
}],
142+
// Specify reporter name with local path
143+
['/absolute/path/to/custom-reporter.js']
144+
132145
]
133146
}
134147
const coverageReport = MCR(options);

0 commit comments

Comments
 (0)