Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-remap-istanbul

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-remap-istanbul

Call remap-istanbul as a karma reporter, enabling remapped reports on watch

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by43.47%
Maintainers
4
Weekly downloads
 
Created
Source

karma-remap-istanbul

Call remap-istanbul as a karma reporter, enabling remapped reports on watch

installation

Install karma-remap-istanbul as a dev-dependency in your project.

npm install karma-remap-istanbul --save-dev

configuration

Add the plugin, reporter and reporter configuration in your karma.conf.js.

{
  plugins: ['karma-remap-istanbul'],
  reporters: ['progress', 'karma-remap-istanbul'],
  remapIstanbulReporter: {
    remapOptions: {}, //additional remap options
    reports: {
      lcovonly: 'path/to/output/coverage/lcov.info',
      html: 'path/to/output/html/report'
    }
  }
}

Example configuration with karma-coverage

{
  preprocessors: {
    'build/**/!(*spec).js': ['coverage']
  },
  plugins: ['karma-remap-istanbul', 'karma-coverage'],
  reporters: ['progress', 'coverage', 'karma-remap-istanbul'],
  remapIstanbulReporter: {
    reports: {
      html: 'coverage'
    }
  }
}

You will need to either install karma-coverage and configure it as a preprocessor for your transpiled modules under test or instrument the modules under test as part of your build process (i.e. via a tool like webpack and the sourcemap-istanbul-instrumenter-loader). If the latter option is chosen, the coverage statistics will need to be stored by the build tool on the __coverage__ global variable (istanbul's default) or karma will not transmit the coverage back to the runner. For a full e2e example please look here.

Keywords

FAQs

Package last updated on 22 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc