In a real web application, you can have a lot of test files. The bundling and running of all test files might take a while. Karma takes a while for the booting process as well. It is not satisfactory for rapid software development if you always have to run hundreds and more tests in order to test a small change in a single file. If you would like to narrow testing for files you are writing the tests for, one file or a specified collection of files should be tested, without rebooting Karma. How to do this?
This is the case where karma-webpack-grep (https://www.npmjs.com/package/karma-webpack-grep) can help you. It allows to limit files, which are bundled by karma-webpack. First, install it:
npm install karma-webpack-grep --save-dev
After that, we have to extend the karma.conf.js file. Put the new karma-webpack-grep plugin to the array of all Webpack's plugins. Everything else remains unchanged:
let grep = require('karma-webpack-grep'...