aboutsummaryrefslogtreecommitdiffstats
path: root/.config/karma.conf.js
diff options
context:
space:
mode:
authordotnetCarpenter <jon.ronnenberg@gmail.com>2016-11-13 00:20:28 +0100
committerdotnetCarpenter <jon.ronnenberg@gmail.com>2016-11-13 00:23:52 +0100
commit3e614d4fe9670fb952d057b0407f6d651e45f71d (patch)
tree080199e269123b29ccb1524a45de385a6f44aaba /.config/karma.conf.js
parent29f3113b1f911e6a1c3c51c52f1b1485973a4fff (diff)
downloadsvg.js-3e614d4fe9670fb952d057b0407f6d651e45f71d.tar.gz
svg.js-3e614d4fe9670fb952d057b0407f6d651e45f71d.zip
added code coverage
Diffstat (limited to '.config/karma.conf.js')
-rw-r--r--.config/karma.conf.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/.config/karma.conf.js b/.config/karma.conf.js
index ad256e2..174fe13 100644
--- a/.config/karma.conf.js
+++ b/.config/karma.conf.js
@@ -37,13 +37,27 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {},
+ preprocessors: {
+ 'dist/svg.js': ['coverage']
+ },
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['progress'],
+ reporters: ['progress', 'coverage'],
+
+
+ // configure the coverage reporter
+ coverageReporter: {
+ // Specify a reporter type.
+ type: 'lcov',
+ dir: 'coverage/',
+ subdir: function(browser) {
+ // normalization process to keep a consistent browser name accross different OS
+ return browser.toLowerCase().split(/[ /-]/)[0]; // output the results into: './coverage/firefox/'
+ }
+ },
// web server port