diff --git a/README.md b/README.md index 8bddb42..07aa50f 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ module.exports = function(config) { }; ``` #### With options -In combination with multiple reporters you may want to disable failed messages because it's already handled by another reporter. +In combination with multiple reporters you may want to disable terminal messages because it's already handled by another reporter. -*Example when using the 'karma-mocha-reporter' plugin*: +*Example using the 'karma-mocha-reporter' plugin*: ```js // karma.conf.js module.exports = function(config) { @@ -41,8 +41,8 @@ module.exports = function(config) { reporters: ['kjhtml', 'mocha'], jasmineHtmlReporter: { - // Suppress failed messages - suppressFailed: true + suppressAll: true, // Suppress all messages (overrides other suppress settings) + suppressFailed: true // Suppress failed messages } }); diff --git a/src/index.js b/src/index.js index c26b657..bd25675 100644 --- a/src/index.js +++ b/src/index.js @@ -12,6 +12,10 @@ var initReporter = function (karmaConfig, baseReporterDecorator) { if (karmaConfig.jasmineHtmlReporter) { const config = karmaConfig.jasmineHtmlReporter; + if (config.suppressAll) { + this.onSpecComplete = () => void 0; + this.onRunComplete = () => void 0; + } if (config.suppressFailed) { this.specFailure = () => void 0; }