diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-21 00:57:18 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-21 00:57:18 +0100 |
commit | f29bd1cb0b839f81bed0b87ae7900da2b1d0e474 (patch) | |
tree | 3477f874fb4c1b4c4b1f1d6cf5a1a6eba58b86d3 | |
parent | 350214c6093bbd300102a364f20caa91d23d5fb9 (diff) | |
download | nextcloud-server-f29bd1cb0b839f81bed0b87ae7900da2b1d0e474.tar.gz nextcloud-server-f29bd1cb0b839f81bed0b87ae7900da2b1d0e474.zip |
adding code coverage support
-rw-r--r-- | build/package.json | 3 | ||||
-rw-r--r-- | tests/karma.config.js | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/build/package.json b/build/package.json index 238ea6881a5..c9ed7b96c6c 100644 --- a/build/package.json +++ b/build/package.json @@ -13,7 +13,8 @@ "devDependencies": { "karma": "*", "karma-jasmine": "*", - "karma-junit-reporter": "*" + "karma-junit-reporter": "*", + "karma-coverage": "*" }, "engine": "node >= 0.8" } diff --git a/tests/karma.config.js b/tests/karma.config.js index cb2d261a4fb..f73ade0f3c6 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -97,7 +97,7 @@ module.exports = function(config) { // test results reporter to use // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - reporters: ['dots', 'junit'], + reporters: ['dots', 'junit', 'coverage'], junitReporter: { outputFile: 'tests/autotest-results-js.xml' @@ -106,6 +106,17 @@ module.exports = function(config) { // web server port port: 9876, + preprocessors: { + 'apps/files/js/*.js': 'coverage' + }, + + coverageReporter: { + dir:'tests/karma-coverage', + reporters: [ + { type: 'html' }, + { type: 'cobertura' } + ] + }, // enable / disable colors in the output (reporters and logs) colors: true, |