diff --git a/.gitignore b/.gitignore index 1e7179decf2c35a7abd5f20937520df9aabc91fd..6a91bccc04fc878505d30fa8ea12ee8d2b7d2269 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ dist/ styleguide/ flow-typed/ + +coverage/ diff --git a/karma.conf.js b/karma.conf.js index 22a1e5990330ac1ef9d6632e6deb817abb834c8a..f72c42f5131bc756ac7864756db38af8ba8b811e 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -28,13 +28,25 @@ module.exports = function (config) { }, reporters: [ 'mocha', + 'progress', 'coverage' ], - // optionally, configure the reporter coverageReporter: { - type : 'text', - //dir : 'coverage/' + // specify a common output directory + dir: './coverage', + reporters: [ + // reporters not supporting the `file` property + { type: 'html', subdir: 'report-html' }, + { type: 'lcov', subdir: 'report-lcov' }, + // reporters supporting the `file` property, use `subdir` to directly + // output them in the `dir` directory + { type: 'cobertura', subdir: '.', file: 'cobertura.txt' }, + { type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }, + { type: 'teamcity', subdir: '.', file: 'teamcity.txt' }, + { type: 'text', subdir: '.', file: 'text.txt' }, + { type: 'text-summary', subdir: '.', file: 'text-summary.txt' }, + ] }, // use the webpack config