karma-espower-preprocessor
v1.2.0
Published
A Karma plugin. power-assert instrumentor
Downloads
1,554
Readme
karma-espower-preprocessor
Preprocess source code by espower-source
Installation
npm install karma-espower-preprocessor --save-dev
I'm recommend to use with karma-sourcemap-loader if you use some altJS.
Configuration
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.js': ['espower']
// '**/*.js': ['sourcemap', 'espower']
},
espowerPreprocessor: {
options: {
// emit espowerified code.
// default: false (in-memory)
emitActualCode: true,
// ignore upstream SourceMap info.
// default: false
ignoreUpstreamSourceMap: false
},
transformPath: function(path) {
// default
return path.replace(/\.js$/, '.espowered.js');
}
}
});
};