Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cannot resolve module 'istanbul-instrumenter-loader'
var cwd = process.cwd(),
path = require('path');
module.exports = function (config) {
config.set({
basePath: cwd,
browsers: [
'Chrome'
],
files: [
'test/spec/**/*'
],
preprocessors: {
'test/spec/**/*.js': ['webpack', 'sourcemap']
},
frameworks: [
'jasmine'
],
reporters: [
'coverage',
'junit',
'progress'
],
coverageReporter: {
dir: 'report/karma-coverage',
reporters: [{
type: 'cobertura'
}, {
type: 'html'
}, {
type: 'text-summary'
}]
},
junitReporter: {
outputFile: 'report/karma-unit.xml'
},
webpack: {
resolve: {
extensions: ['', '.js'],
modulesDirectories: [path.join(cwd, 'bower_components'), path.join(cwd, 'node_modules')]
},
devtool: 'inline-source-map',
module: {
postLoaders: [{
test: /\.js$/,
exclude: /(test|node_modules|bower_components)\//,
loader: 'istanbul-instrumenter-loader'
}]
}
},
plugins: [
'karma-chrome-launcher',
'karma-coverage',
'karma-jasmine',
'karma-junit-reporter',
'karma-sourcemap-loader',
'karma-webpack',
'istanbul-instrumenter-loader'
],
logLevel: config.LOG_INFO
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment