Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

karma-jasmine-html-reporter-sourcemaps

kshanafelt10MIT0.1.1

A Karma/jasmine plugin. Dynamically displays tests results at debug.html page, with source map support

karma-plugin, karma-reporter, html

readme

karma-jasmine-html-reporter-sourcemaps

Forked from taras42/karma-jasmine-html-reporter This fork brought to you by an issue on jasmine: Feature Request: Sourcemap support Thanks to

This is currently a work in progress.

Reporter that dynamically displays tests results at debug.html page, with source map support. Jasmine 1.3 is not supported.

alt tag

You can also run describe block, or single test.

alt tag

Installation

The easiest way is to keep karma-jasmine-html-reporter-sourcemaps as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-jasmine-html-reporter-sourcemaps": "~0.1"
  }
}

You can simple do it by:

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

Configuration

see example

// karma.conf.js
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine'],
    preprocessors: {
            // add webpack as preprocessor
            'test/*_test.js': ['webpack', 'sourcemap'],
            'test/**/*_test.js': ['webpack', 'sourcemap']
     },
    reporters: ['karma-jasmine-html-sourcemaps']

  });
};

Currently only inline-source-maps are supported.

// webpack.config.js
module.exports = { 
    devtool: 'inline-source-map' 
};

You can pass list of reporters as a CLI argument too:
```bash
karma start --reporters kjhtml