Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

karma-webpack-grep

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-webpack-grep

karma start --grep some/pattern

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
2K
-20.89%
Maintainers
1
Weekly downloads
 
Created
Source

karma-webpack-grep

Enables you to run karma start --grep some/partial/path to limit which files karma-webpack bundles. This can give a huge performance boost when booting up karma in development.

Installation

$ npm install --save-dev karma-webpack-grep

Usage

When using karma-webpack, you must provide webpack config to karma. Use this module to extend the plugins of your webpack config:

// somewhere in your karma.conf.js

module.exports = function (config) {
  webpackConfig.plugins = (webpackConfig.plugins || []).concat(
    grep({
      grep: config.grep,
      // same baseDir as used in karma conf
      baseDir: 'client',
      // same string as used in `require.ensure`
      // in your main test file
      // see https://github.com/webpack/karma-webpack#alternative-usage
      testContext: '..'
    })
  )
}

Docs

Read a more in depth explanation of this approach at https://medium.com/@kidkarolis/karma-webpack-grep-super-fast-tests-in-dev-b11130e2c2c6.

FAQs

Package last updated on 10 Oct 2015

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