https://github.com/whyboris/karma-helpful-reporter
A karma reporter based on karma-nyan-reporter
https://github.com/whyboris/karma-helpful-reporter
karma-reporter
Last synced: about 1 month ago
JSON representation
A karma reporter based on karma-nyan-reporter
- Host: GitHub
- URL: https://github.com/whyboris/karma-helpful-reporter
- Owner: whyboris
- License: other
- Created: 2017-07-29T01:15:24.000Z (almost 8 years ago)
- Default Branch: karma-helpful-reporter
- Last Pushed: 2023-03-04T03:39:47.000Z (about 2 years ago)
- Last Synced: 2024-05-21T11:34:56.453Z (12 months ago)
- Topics: karma-reporter
- Language: JavaScript
- Homepage:
- Size: 753 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://badge.fury.io/js/karma-helpful-reporter)
[](https://travis-ci.org/whyboris/karma-helpful-reporter)
[](https://coveralls.io/github/whyboris/karma-helpful-reporter?branch=karma-helpful-reporter)
[](https://codeclimate.com/github/whyboris/karma-helpful-reporter)
[](https://david-dm.org/whyboris/karma-helpful-reporter)karma-helpful-reporter
===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.
Setup & Options
===Install with npm:
```sh
npm install --save-dev karma-helpful-reporter
```Inside your `karma.conf.js`
- add `require('karma-helpful-reporter')` to the `plugins` array
- add `'helpful'` to the `reporters` arrayOptionally, add the `helpfulReporter` object with as many properties from the below set as you'd like.
- The listed properties' values are the default ones```js
// 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,
}
});
};
```Property | Default | Description
--- | --- | ---
animationStyle | 'braille' | Set in-progress animation to _'braille'_, _'braille2'_, or emoji _'clock'_.
clearScreenBeforeEveryRun | false | Clear screen before every run
hideBrowser | true | Hide browser name from the report
maxLogLines | 42 | Limit the maximum number of lines in report
removeLinesContaining | [] | Remove all lines from the final report containing any of these strings, e.g. _['@angular', 'zone.js']_
removeTail | false | Remove from the final report anything that follows '<-', e.g. _blah blah <- test.ts 4250:39_ becomes _blah blah_
renderOnRunCompleteOnly | false | Do not animate while tests are running
suppressErrorReport | false | Suppress the error report at the end of the test run
underlineFileType | '' | Underline filename of some file type; all files in the error report that have this particular extention will be underlined, e.g. _'spec.ts'_; set the color with the _colorUnderline_ property
colorBrowser | 224 |![]()
colorConsoleLogs | 45 |![]()
colorFail | 210 |![]()
colorFirstLine | 217 |![]()
colorLoggedErrors | 250 |![]()
colorPass | 154 |![]()
colorSkip | 117 |![]()
colorTestName | 210 |![]()
colorUnderline | 255 |Set custom colors by using permitted [cli-color](https://github.com/medikoo/cli-color) numbers.
Notes
===This project was forked from [karma-nyan-reporter](https://github.com/dgarlitt/karma-nyan-reporter/) in July 2017 and updated with improved functionality.