A Karma plugin. Report results in styled html format.
npm install karma-htmlfile-reporterkarma-htmlfile-reporter
=======================
karma-htmlfile-reporter as a devDependency in your package.json.
json
{
"devDependencies": {
"karma": "~0.10",
"karma-htmlfile-reporter": "~0.3"
}
}
`
You can simple do it by:
`bash
npm install karma-htmlfile-reporter --save-dev
`
It may also be necessary to install globally:
`bash
npm install -g karma-htmlfile-reporter
`
Configuration
`js
// karma.conf.js
module.exports = function(config) {
config.set({
reporters: ['progress', 'html'],
htmlReporter: {
outputFile: 'tests/units.html',
// Optional
pageTitle: 'Unit Tests',
subPageTitle: 'A sample project description',
groupSuites: true,
useCompactStyle: true,
useLegacyStyle: true,
showOnlyFailed: false
}
});
};
`
You can pass list of reporters as a CLI argument too:
`bash
karma start --reporters html
``