diff --git a/Build/package.json b/Build/package.json index d3c12edf4952aad07563dbb18ca1dfe3952e7306..6c2b678a8c093472b35004863e779b6da6fdea08 100644 --- a/Build/package.json +++ b/Build/package.json @@ -22,9 +22,11 @@ "jasmine-core": "^2.4.1", "karma": "^0.13.22", "karma-chrome-launcher": "^1.0.1", + "karma-coverage": "^1.0.0", "karma-firefox-launcher": "^1.0.0", "karma-ie-launcher": "^1.0.0", "karma-jasmine": "^1.0.2", + "karma-junit-reporter": "^1.0.0", "karma-opera-launcher": "^1.0.0", "karma-phantomjs-launcher": "^1.0.0", "karma-requirejs": "^1.0.0", diff --git a/typo3/sysext/core/Build/Configuration/JSUnit/karma.conf.js b/typo3/sysext/core/Build/Configuration/JSUnit/karma.conf.js index 173b24082cfcdf67bc1dffbd7f34a941f49855b1..a88894fe03fdcfa840af6e7b62d13e726a33b5c0 100644 --- a/typo3/sysext/core/Build/Configuration/JSUnit/karma.conf.js +++ b/typo3/sysext/core/Build/Configuration/JSUnit/karma.conf.js @@ -29,12 +29,25 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { + 'typo3/sysext/**/Resources/Public/JavaScript/**/*.js': ['coverage'] }, // test results reporter to use - // possible values: 'dots', 'progress' + // possible values: 'dots', 'progress', 'coverage', 'junit' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], + reporters: ['progress', 'junit', 'coverage'], + + junitReporter: { + outputDir: 'typo3temp/var/tests/', + useBrowserName: false, + outputFile: 'karma.junit.xml' + }, + + coverageReporter: { + reporters: [ + {type: 'clover', dir: 'typo3temp', subdir: 'var/tests', file: 'karma.clover.xml'} + ] + }, // web server port port: 9876,