karma-jasmine-html-reporter
Reporter that dynamically shows tests results at debug.html page.
You can also run a describe block, or a single test.
Installation
You can simply install karma-jasmine-html-reporter
as a devDependency by:
npm install karma-jasmine-html-reporter --save-dev
Configuration
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-jasmine-html-reporter')
],
client: {
jasmine: {
}
},
reporters: ['kjhtml']
});
};
With options
In combination with multiple reporters you may want to disable terminal messages because it's already handled by another reporter.
Example using the 'karma-mocha-reporter' plugin:
module.exports = function(config) {
config.set({
reporters: ['kjhtml', 'mocha'],
jasmineHtmlReporter: {
suppressAll: true,
suppressFailed: true
}
});
};
You can pass a list of reporters as a CLI argument too:
karma start --reporters kjhtml
Version compatibility
jasmine Version | karma-jasmine-html-reporter version |
---|
2.x | 0.2.2 |
3.x | 1.x |
4.x | 2.x |