use karma-coverage and istanbul

This commit is contained in:
David Kaltschmidt
2015-06-16 15:41:27 +02:00
parent 5627658a2e
commit 24bd8d1908
3 changed files with 14 additions and 2 deletions

View File

@@ -128,7 +128,6 @@ describe('AppStore', function() {
registeredCallback(RouteAction);
expect(AppStore.getSelectedNodeId()).toBe(null);
expect(AppStore.getNodes()).toEqual(NODE_SET);
});

View File

@@ -48,9 +48,11 @@
"gulp-preprocess": "^1.2.0",
"gulp-size": "^1.2.1",
"gulp-util": "^3.0.4",
"istanbul-instrumenter-loader": "^0.1.3",
"jasmine-core": "^2.3.4",
"karma": "^0.12.33",
"karma-cli": "0.0.4",
"karma-coverage": "^0.4.2",
"karma-jasmine": "^0.3.5",
"karma-phantomjs-launcher": "^0.1.4",
"karma-webpack": "^1.5.1",

View File

@@ -16,8 +16,12 @@ module.exports = function(config) {
'tests.webpack.js': ['webpack']
},
reporters: [
'dots'
'dots',
'coverage'
],
coverageReporter: {
type: 'text-summary'
},
webpack: {
module: {
loaders: [
@@ -26,6 +30,13 @@ module.exports = function(config) {
exclude: /node_modules/,
loader: 'babel-loader'
}
],
postLoaders: [
{
test: /\.js$/,
exclude: /(test|node_modules|bower_components)\//,
loader: 'istanbul-instrumenter'
}
]
},
watch: true