karma-nicer-reporter v1.1.0
A nicer reporter for Karma.
#What is this?
A "nicer" reporter for karma test runner designed to show you what you need to know at a glance:
- Only prints details for failed tests
- Color-coded summary passed/failed/skipped per suite
- Shortens URLs of files in error message print out
Example screenshot
(Taken from ConEmu on Windows)
#Installation
npm install karma-nicer-reporter --save-dev
#Usage
In your karma configuration file include nicer as a (or the) reporter.
...
reporters: ['nicer'],
...
#Configuration
Adding a nicerReporter entry in your karma configuration file, you can override the default colors (which come from chalk).
...
nicerReporter : {
defaulColor: 'cyan',
successColor: 'green',
failColor: 'red',
skipColor: 'yellow',
errorLogColor: 'white'
}
...
#Development
There is an example karma.conf.js and some example specs you can run to see the output. These are best run using:
gulp test
Which overwrites index.js in the node_modules folder before running karma start.
Pull requests welcome.
#Roadmap
One feature missing is times for individual tests, which isn't there because we don't print individual tests unless they fail. Perhaps it could be included as a second runner.
Also, this has only been tested with:
autoWatch: false,
singleRun: true,
And not in any CI enviroment.
#Licence
MIT