Skip to content

Commit

Permalink
65 ci enforce test coverage threshold (#66)
Browse files Browse the repository at this point in the history
Enforce test coverage threshold
  • Loading branch information
andreyponomarevru authored Feb 3, 2025
1 parent 9662974 commit 8529c4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion api/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@
"resetMocks": true,
"restoreMocks": true,
"extensionsToTreatAsEsm": [".ts"],
"setupFilesAfterEnv": ["jest-extended/all"]
"setupFilesAfterEnv": ["jest-extended/all"],

"collectCoverage": true,
"collectCoverageFrom": ["src/**/*.ts", "src/**/*.tsx", "!**/src/open-api/**"],
"coverageThreshold": {
"global": {
"branches": 7,
"functions": 1,
"lines": 7,
"statements": 6
}
}
}
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"build": "tsc -p ./tsconfig.json",
"serve:dev": "nodemon --watch ./src -e ts,json --exec 'TS_NODE_PROJECT=tsconfig.json node --inspect=0.0.0.0:9229 --require ts-node/register ./src/index.ts'",
"test:unit": "jest --testMatch='**/*.unit.test.ts' --verbose --detectOpenHandles --colors",
"test:int": "jest --testMatch='**/*.int.test.ts' --verbose --detectOpenHandles --runInBand --colors ./tests-integration",
"test:unit": "jest --verbose --detectOpenHandles --colors ./src",
"test:int": "jest --verbose --detectOpenHandles --runInBand --colors ./tests-integration",
"test:e2e-api": "jest ./tests-e2e-api --verbose --detectOpenHandles --runInBand --colors",
"test:coverage": "jest --coverage",
"test:clearjest": "jest --clearCache",
Expand Down

0 comments on commit 8529c4d

Please sign in to comment.