🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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
Version published
Weekly downloads
0
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

webpack-loader

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