diff --git a/api/jest.config.json b/api/jest.config.json index 8543b1f..6dba7cc 100644 --- a/api/jest.config.json +++ b/api/jest.config.json @@ -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 + } + } } diff --git a/api/package.json b/api/package.json index b07cb39..45720a9 100644 --- a/api/package.json +++ b/api/package.json @@ -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",