karma-webpack-grep
karma start --grep some/pattern
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 { webpackConfigplugins = webpackConfigplugins || }
Docs
Read a more in depth explanation of this approach at https://medium.com/@kidkarolis/karma-webpack-grep-super-fast-tests-in-dev-b11130e2c2c6.