karma-commonjs-require
v0.0.3
Published
Karma plugin to achive require method from commonjs-require-definition package used in brunch projects.
Downloads
742
Maintainers
Readme
karma-commonjs-require
Used for testing project that builded by Brunch build tool which uses Common.js require. Generally it useful when you want to generate coverage for source files.
Configuration
module.exports = function(config) {
config.set({
................
plugins: [
'karma-mocha',
'karma-phantomjs-launcher',
'karma-coverage',
// add plugin
'karma-commonjs-require'
],
// add to framework list
frameworks: ['mocha', 'common-require'],
// You can define custom application root directory, by default is 'app'
commonRequirePreprocessor: {
appDir: 'app'
},
preprocessors: {
'app/**/*.js' : ['common-require'],
'test/**/*.js' : ['common-require']
}
...............
});
};