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

@jsdevtools/coverage-istanbul-loader

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsdevtools/coverage-istanbul-loader

A Webpack loader that uses Istanbul to add code coverage instrumentation

  • 3.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
351K
decreased by-12.58%
Maintainers
2
Weekly downloads
 
Created

What is @jsdevtools/coverage-istanbul-loader?

@jsdevtools/coverage-istanbul-loader is a Webpack loader that instruments your code with Istanbul coverage when running tests. It is typically used in conjunction with test runners like Mocha, Karma, or Jest to generate code coverage reports.

What are @jsdevtools/coverage-istanbul-loader's main functionalities?

Instrumenting Code for Coverage

This feature allows you to instrument your JavaScript code for coverage. The loader processes files matching the specified test pattern (in this case, .js files in the src directory) and instruments them using Istanbul.

module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        include: /src/,
        loader: '@jsdevtools/coverage-istanbul-loader'
      }
    ]
  }
};

Combining with Other Loaders

This feature demonstrates how to combine @jsdevtools/coverage-istanbul-loader with other loaders, such as babel-loader. This is useful for transpiling ES6+ code and then instrumenting it for coverage.

module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        include: /src/,
        use: [
          'babel-loader',
          '@jsdevtools/coverage-istanbul-loader'
        ]
      }
    ]
  }
};

Other packages similar to @jsdevtools/coverage-istanbul-loader

Keywords

FAQs

Package last updated on 16 Jul 2020

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