Skip to content
Snippets Groups Projects
Commit 3c61f744 authored by Susanne Moog's avatar Susanne Moog Committed by Christian Kuhn
Browse files

[TASK] Add karma-coverage and karma-junit-reporter

To get junit compatible results and code coverage
reports that can be understood by CI systems this
patch adds dependencies to karma-coverage and
karma-junit-reporter. It also adds the necessary configuration.

Change-Id: I27ae2e7e6aecf3271d21c1ccff9f8458092cc5e5
Releases: master
Resolves: #76730
Reviewed-on: https://review.typo3.org/48634


Reviewed-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a0ea123c
No related merge requests found
......@@ -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",
......
......@@ -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,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment