karma-html-reporter
Reporter that formats results in HTML similar to jasmine.
Installation
The easiest way is to keep karma-html-reporter
as a devDependency in your package.json
.
{
"devDependencies": {
"karma": "~0.10",
"karma-html-reporter": "~0.1"
}
}
You can simply do it by:
npm install karma-html-reporter --save-dev
Configuration
module.exports = function(config) {
config.set({
reporters: ['progress', 'html'],
htmlReporter: {
outputDir: 'karma_html',
templatePath: null,
focusOnFailures: true,
namedFiles: false,
pageTitle: null,
urlFriendlyName: false,
reportName: 'report-summary-filename',
preserveDescribeNesting: false,
foldAll: false,
},
});
};
You can pass list of reporters as a CLI argument too:
karma start --reporters html,dots
Keyboard Controls
1
and 2
- switch between Spec List and Failures.
F
- fold/unfold all suites in preserveDescribeNesting
mode.
For more information on Karma see the homepage.