Commit 38223e10 by Samuel Padgett

Capture code coverage for karma tests

parent 41e0cc28
node_modules node_modules
coverage
.tmp .tmp
.bundle .bundle
.idea .idea
...@@ -7,5 +8,3 @@ phantomjsdriver.log ...@@ -7,5 +8,3 @@ phantomjsdriver.log
.DS_Store .DS_Store
test/test-results.xml test/test-results.xml
npm-debug.log npm-debug.log
...@@ -48,7 +48,7 @@ module.exports = function(config) { ...@@ -48,7 +48,7 @@ module.exports = function(config) {
// use dots reporter, as travis terminal does not support escaping sequences // use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress' // possible values: 'dots', 'progress'
// CLI --reporters progress // CLI --reporters progress
reporters: ['progress', 'junit'], reporters: ['progress', 'junit', 'coverage'],
junitReporter: { junitReporter: {
// will be resolved to basePath (in the same way as files/exclude patterns) // will be resolved to basePath (in the same way as files/exclude patterns)
...@@ -58,7 +58,6 @@ module.exports = function(config) { ...@@ -58,7 +58,6 @@ module.exports = function(config) {
// web server port // web server port
port: 8443, port: 8443,
colors: true, colors: true,
// level of logging // level of logging
...@@ -90,6 +89,14 @@ module.exports = function(config) { ...@@ -90,6 +89,14 @@ module.exports = function(config) {
// report which specs are slower than 500ms // report which specs are slower than 500ms
// CLI --report-slower-than 500 // CLI --report-slower-than 500
reportSlowerThan: 500 reportSlowerThan: 500,
preprocessors: {
// source files, that you wanna generate coverage for
// do not include tests or libraries
'src/filters/*.js': ['coverage'],
'src/services/*.js': ['coverage'],
'src/ui-services/*.js': ['coverage']
}
}); });
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment