diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/karma.conf.js | 18 |
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 |