🌜
🌞
karma-jasmine-html-reporter

karma-jasmine-html-reporter

v2.0.0

A Karma plugin. Dynamically displays tests results at debug.html page

npm install karma-jasmine-html-reporter

README

karma-jasmine-html-reporter

npm version npm downloads

Reporter that dynamically shows tests results at debug.html page.

alt tag

You can also run a describe block, or a single test.

alt tag

Installation

You can simply install karma-jasmine-html-reporter as a devDependency by:

npm install karma-jasmine-html-reporter --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine'],
    plugins: [
        require('karma-jasmine'),
        require('karma-jasmine-html-reporter')
    ],
    client: {
        jasmine: {
            // you can add configuration options for Jasmine here
            // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
            // for example, you can disable the random execution with `random: false`
            // or set a specific seed with `seed: 4321`
        }
    },
    reporters: ['kjhtml']
  });
};

With options

In combination with multiple reporters you may want to disable terminal messages because it's already handled by another reporter.

Example using the 'karma-mocha-reporter' plugin:

// karma.conf.js
module.exports = function(config) {
  config.set({

    // Combine multiple reporters
    reporters: ['kjhtml', 'mocha'],

    jasmineHtmlReporter: {
      suppressAll: true, // Suppress all messages (overrides other suppress settings)
      suppressFailed: true // Suppress failed messages
    }

  });
};

You can pass a list of reporters as a CLI argument too:

karma start --reporters kjhtml

Version compatibility

jasmine Version karma-jasmine-html-reporter version
2.x 0.2.2
3.x 1.x
4.x 2.x

Release Notes

2.0.0
By David Federman • Published on May 26, 2022

This version rewrites the package to use the peer jasmine-core package instead of repackaging the html reporting code. This fixes support for Jasmine v4 and (hopefully) will require less package updates going forward.

1.7.0
By David Federman • Published on July 9, 2021

Upgrade to Jasmine 3.8

1.6.0
By David Federman • Published on May 7, 2021

Upgrade to Jasmine 3.7.1

1.5.4
By David Federman • Published on May 12, 2020

Manually integrate unreleased Jasmine fix: jasmine/[email protected]

1.5.3
By David Federman • Published on March 24, 2020

Added suppressAll option to config (#40)

1.5.2
By David Federman • Published on February 3, 2020

Added options object to be able to overwrite logging (#36)

1.5.1
By David Federman • Published on December 25, 2019

Fix bad merge, re-do #25

1.5.0
By David Federman • Published on December 25, 2019

Upgraded to Jasmine 3.5

1.4.2
By David Federman • Published on April 25, 2019

Only override specFilter if query exists

1.4.1
By David Federman • Published on April 24, 2019

Respect spec filters set by other plugins.

General

License
MIT
Typescript Types
Tree-shakeable
No

Popularity

GitHub Stargazers
31
Community Interest
63
Number of Forks
28

Maintenance

Commits
10/219/2203
Last Commit
May 26, 2022
Open Issues
0
Closed Issues
41
Open Pull Requests
0
Closed Pull Requests
20

Versions

Versions Released
10/219/2201
Latest Version Released
Current Tags
latest2.0.0

Dependencies

Dependencies (0)
Dev Dependencies (2)

Contributors

dfederm
dfederm
Commits: 21
taras42
taras42
Commits: 16
yudhasetiawan
yudhasetiawan
Commits: 3
PVermeer
PVermeer
Commits: 2
saschanaz
saschanaz
Commits: 1
footballencarta
footballencarta
Commits: 1
AdamVig
AdamVig
Commits: 1