karma-jasmine-html-reporter
A Karma plugin. Dynamically displays tests results at debug.html page
Last updated 3 months ago by dfederm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install karma-jasmine-html-reporter 
SYNC missed versions from official npm registry.

karma-jasmine-html-reporter

npm version npm downloads

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

Jasmine 1.3 is not supported. For Jasmine < 3.0.0, use version 0.2.2

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({
    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

Develop

There's not much to this package.

adapter.js, html.jasmine.reporter.js, and jasmine.css are copied with small adjustments from jasmine/lib/jasmine-core/boot.js and jasmine/lib/jasmine-core/jasmine-html.js, and jasmine/lib/jasmine-core/jasmine.css respectively.

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 needs a lot of manual removals.

Current Tags

  • 1.5.4                                ...           latest (3 months ago)

21 Versions

  • 1.5.4                                ...           3 months ago
  • 1.5.3                                ...           5 months ago
  • 1.5.2                                ...           6 months ago
  • 1.5.1                                ...           8 months ago
  • 1.5.0                                ...           8 months ago
  • 1.4.2                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
Maintainers (1)
Downloads
Today 60
This Week 6,265
This Month 14,713
Last Day 1,069
Last Week 7,672
Last Month 32,744
Dependencies (0)
None
Dev Dependencies (2)
Dependents (118)

Copyright 2014 - 2016 © taobao.org |