When running tests with coverage unabled I get the following error:
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
TypeError: 'undefined' is not an object (evaluating '__cov_D1A7MlvwxOn0_pa5rDu2WA.b['1'][0]')
at
http://localhost:9877/__karma__/var/folders/z5/sy272dds6z16v7cxmhnj9fkc0000gq/T/780b17f08376c0b3a4a0622d91a1b48c.browserify:32 <- project/project/app/modules/app.js:9:0
However, removing the coverage options everything work as expected (without coverage that is)
Version of relevant libs after the karma config
Here's my _karma.conf.js file:
'use strict';
var path = require('path');
var preprocessors = {};
preprocessors[__dirname.concat('/app/**/*.js')] = ['browserify', 'coverage'];
module.exports = function(config) {
config.set({
basePath: '../',
frameworks: ['browserify', 'jasmine'],
preprocessors: preprocessors,
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
plugins : [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-browserify',
'karma-coverage'
],
browserify: {
debug: true,
transform: [
require('bulkify'),
require('browserify-shim'),
require('browserify-istanbul')
]
},
"coverageReporter": {
"reporters": [
{"type": "html"},
{"type": "text-summary"}
]
},
singleRun: false,
proxies: {
'/': 'http://localhost:9876/'
},
colors: true,
urlRoot: '/__karma__/',
files: [
// app-specific code
path.resolve('app/modules/app.js'),
// test files
path.resolve('app/modules/**/*.spec.js')
]
});
};
"browserify": "^11.0.1"
"browserify-istanbul": "^0.2.1"
"karma": "^0.13.9"
"karma-browserify": "^4.3.0"
"karma-jasmine": "^0.3.6"
"phantomjs": "^1.9.18"