chore: added test coverage collection

updated the jest configuration to generate a coverage report on the entire project when tests are run. this coverage report has been added to the the gitignore file as it is not relevant to store it in the online repository.

ref: N25B-114
This commit is contained in:
JGerla
2025-10-25 13:54:18 +02:00
parent 8513be5a56
commit b64d4fbd01
2 changed files with 6 additions and 1 deletions

3
.gitignore vendored
View File

@@ -22,3 +22,6 @@ dist-ssr
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
# Coverage report
coverage

View File

@@ -10,5 +10,7 @@ export default {
testMatch: ['<rootDir>/test/**/*.test.(ts|tsx)'], testMatch: ['<rootDir>/test/**/*.test.(ts|tsx)'],
transform: { transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { useESM: true, tsconfig: 'tsconfig.jest.json' }] '^.+\\.(ts|tsx)$': ['ts-jest', { useESM: true, tsconfig: 'tsconfig.jest.json' }]
} },
collectCoverage:true,
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}'],
}; };