Commit 60b35224 authored by Fabio Huser's avatar Fabio Huser Committed by Roger Meier

Add istanbul cobertura reporter to Jest and Karma tests

parent 9306437b
...@@ -226,6 +226,8 @@ coverage-frontend: ...@@ -226,6 +226,8 @@ coverage-frontend:
expire_in: 31d expire_in: 31d
paths: paths:
- coverage-frontend/ - coverage-frontend/
reports:
cobertura: coverage-frontend/cobertura-coverage.xml
.qa-frontend-node: .qa-frontend-node:
extends: extends:
......
...@@ -181,7 +181,7 @@ module.exports = function(config) { ...@@ -181,7 +181,7 @@ module.exports = function(config) {
if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') { if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') {
karmaConfig.reporters.push('coverage-istanbul'); karmaConfig.reporters.push('coverage-istanbul');
karmaConfig.coverageIstanbulReporter = { karmaConfig.coverageIstanbulReporter = {
reports: ['html', 'text-summary'], reports: ['html', 'text-summary', 'cobertura'],
dir: 'coverage-javascript/', dir: 'coverage-javascript/',
subdir: '.', subdir: '.',
fixWebpackSourcePaths: true, fixWebpackSourcePaths: true,
......
...@@ -26,6 +26,6 @@ reportFiles ...@@ -26,6 +26,6 @@ reportFiles
const context = createContext({ coverageMap: coverageMap, dir: 'coverage-frontend' }); const context = createContext({ coverageMap: coverageMap, dir: 'coverage-frontend' });
['json', 'lcov', 'text-summary', 'clover'].forEach(reporter => { ['json', 'lcov', 'text-summary', 'clover', 'cobertura'].forEach(reporter => {
create(reporter, {}).execute(context); create(reporter, {}).execute(context);
}); });
Markdown is supported
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