This package has been deprecated
Renamed to karma-browserify as of version 1.0
This project has renamed to karma-browserify as of version
Get the plug-in via npm
npm install --save-dev karma-bro
browserify as a framework to your Karma configuration file. For each file that should be processed and bundled by karma, configure the
browserify preprocessor. Optionally use the
browserify config entry to configure how the bundle gets created.
Test bundles can be configured through the
browserify karma configuration property. Configuration options are passed directly to browserify.
For example to generate source maps for easier debugging, specify:
There are three properties that are not passed directly:
browserify:transform: 'reactify' 'coffeeify' 'brfs'// don't forget to register the extensionsextensions: '.js' '.jsx' '.coffee'
You can also specify options for the transformations:
browserify:transform: 'reactify' 'es6': true 'coffeeify' 'brfs'
The browserify plugin option supports the same syntax as
Additional Bundle Configuration
You may perform additional configuration in a function that you pass as the
prebundle option and that receives the bundle as an argument. This is useful when you need to set up things like externals:
How it Works
Bro is a preprocessor for Karma that combines test files and dependencies into a browserified bundle. It relies on watchify to generate the bundle and to keep it updated during
Before the initial test run Bro builds one browserify bundle for all test cases and dependencies. Once any of the files change, it incrementally updates the bundle. Each file included in karma is required from the file bundle via a stub. Thereby it ensures tests are only executed once per test run.
The following code snippet shows a Karma configuration file with all Bro related options.