Skip to content

Instantly share code, notes, and snippets.

@ahmednuaman
Created April 11, 2015 13:39
Show Gist options
  • Save ahmednuaman/6156cad582db96a9099e to your computer and use it in GitHub Desktop.
Save ahmednuaman/6156cad582db96a9099e to your computer and use it in GitHub Desktop.
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