Karma Helpful Reporter gives you a customizable report after you run your Karma tests.
The errors from failed tests are displayed hierarchically based on the test suite and nesting level. console.log() messages are output at the bottom below the test summary and grouped by browser.
Install with npm:
npm install --save-dev karma-helpful-reporterInside your karma.conf.js
- add
require('karma-helpful-reporter')to thepluginsarray - add
'helpful'to thereportersarray
Optionally, add the helpfulReporter object with as many properties from the below set as you'd like.
- The listed properties' values are the default ones
// karma.conf.js
module.exports = function(config) {
config.set({
plugins: [ require('karma-helpful-reporter') ],
reporters: [ 'helpful' ],
// Optional reporter settings
helpfulReporter: {
animationStyle: 'braille',
clearScreenBeforeEveryRun: false,
hideBrowser: false,
maxLogLines: 42,
removeLinesContaining: [],
removeTail: false,
renderOnRunCompleteOnly: false,
suppressErrorReport: false,
underlineFileType: '',
colorBrowser: 205,
colorConsoleLogs: 45,
colorFail: 9,
colorFirstLine: 211,
colorLoggedErrors: 250,
colorPass: 10,
colorSkip: 11,
colorTestName: 199,
colorUnderline: 254,
}
});
};Set custom colors by using permitted cli-color numbers.
This project was forked from karma-nyan-reporter in July 2017 and updated with improved functionality.
