diff --git a/README.md b/README.md index 666f5c6..44692ca 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,21 @@ module.exports = { }; ``` +If you do not want to print out the mocha epilogue (i.e. `1 passing (5.2s)`), you can suppress it: + +```js +// wdio.conf.js +module.exports = { + // ... + reporters: ['json'], + reporterOptions: { + suppressEpilogue: true + }, + // ... +}; +``` + + ## Sample Output ``` diff --git a/lib/reporter.js b/lib/reporter.js index 0e8814a..2a49ddd 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -39,7 +39,9 @@ class JsonReporter extends events.EventEmitter { if(options.combined) { this.combineJsons(resultJsons); } - epilogue.call(baseReporter) + if (!options.suppressEpilogue){ + epilogue.call(baseReporter) + } }) }