Skip to content

Commit

Permalink
attempting to make code coverage work on azure pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
saboya committed Jun 16, 2020
1 parent 9bfabc2 commit 5cc8826
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ steps:
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
pathToSources: '$(System.DefaultWorkingDirectory)'
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml

2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{ts,js}'],
coverageReporters: ['text', 'text-summary', 'cobertura'],
coverageReporters: ['text', 'text-summary'],
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"build": "tsc src/index.ts -d -m commonjs -t es2017 --outDir lib",
"lint": "eslint --quiet --ext .js,.ts,.tsx ./src/",
"test": "jest --ci --reporters=default --reporters=jest-junit"
"test": "jest --ci --reporters=default --reporters=jest-junit --coverageReporters=cobertura"
},
"devDependencies": {
"@types/jest": "^26.0.0",
Expand Down

0 comments on commit 5cc8826

Please sign in to comment.