1 | # karma-jasmine-html-reporter
|
2 |
|
3 | [![npm version](https://img.shields.io/npm/v/karma-jasmine-html-reporter.svg)](https://www.npmjs.com/package/karma-jasmine-html-reporter) [![npm downloads](https://img.shields.io/npm/dm/karma-jasmine-html-reporter.svg)](https://www.npmjs.com/package/karma-jasmine-html-reporter)
|
4 |
|
5 | Reporter that dynamically shows tests results at debug.html page.
|
6 |
|
7 | Jasmine 1.3 is not supported. For Jasmine < 3.0.0, use version 0.2.2
|
8 |
|
9 | ![alt tag](/screenshots/reporter_1.png)
|
10 |
|
11 | You can also run a describe block, or a single test.
|
12 |
|
13 | ![alt tag](/screenshots/reporter_2.png)
|
14 |
|
15 | ## Installation
|
16 |
|
17 | You can simply install `karma-jasmine-html-reporter` as a devDependency by:
|
18 | ```bash
|
19 | npm install karma-jasmine-html-reporter --save-dev
|
20 | ```
|
21 |
|
22 | ## Configuration
|
23 | ```js
|
24 | // karma.conf.js
|
25 | module.exports = function(config) {
|
26 | config.set({
|
27 | reporters: ['kjhtml']
|
28 | });
|
29 | };
|
30 | ```
|
31 |
|
32 | You can pass a list of reporters as a CLI argument too:
|
33 | ```bash
|
34 | karma start --reporters kjhtml
|
35 | ```
|
36 |
|
37 | ## Develop
|
38 |
|
39 | There's not much to this package.
|
40 |
|
41 | [`adapter.js`](src/lib/adapter.js), [`html.jasmine.reporter.js`](src/lib/html.jasmine.reporter.js), and [`jasmine.css`](src/css/jasmine.css) are copied with small adjustments from [`jasmine/lib/jasmine-core/boot.js`](https://github.com/jasmine/jasmine/blob/master/lib/jasmine-core/boot.js) and [`jasmine/lib/jasmine-core/jasmine-html.js`](https://github.com/jasmine/jasmine/blob/master/lib/jasmine-core/jasmine-html.js), and [`jasmine/lib/jasmine-core/jasmine.css`](https://github.com/jasmine/jasmine/blob/master/lib/jasmine-core/jasmine.css) respectively.
|
42 |
|
43 | Just pull over changes from Jasmine as needed. There is a script to help with that; just run `npm run build` and review the changes. Specifically, [`adapter.js`](src/lib/adapter.js) needs a lot of manual removals.
|
44 |
|
\ | No newline at end of file |