Karma preprocessor for saving test bundles into .dump
files.
Using npm:
npm install karma-bundledump-preprocessor --save-dev
Following code shows the default configuration:
// karma.conf.js
module.exports = function (config) {
config.set({
plugins: [
require("karma-bundledump-preprocessor"),
],
preprocessors: {
"**/*.js": ["bundledump"],
},
});
};
Note. Karma will execute the preprocessors over the files in the order they are listed. Make sure that the bundledump
is the last preprocessor in the preprocessors
array.
Karma preprocessors mutate the content of the test files. This preprocessor saves the final test bundle to a .dump
file before it is loaded into the browser. Then you can inspect the dump file for build errors or other errors.
For more information on Karma see the homepage.