-
Notifications
You must be signed in to change notification settings - Fork 176
Expand file tree
/
Copy pathjest.backend.config.js
More file actions
46 lines (46 loc) · 1.25 KB
/
Copy pathjest.backend.config.js
File metadata and controls
46 lines (46 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/** Minimal Jest config for running backend-only TypeScript tests without Expo. */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: {
'^bullmq$': '<rootDir>/backend/shared/queue/__mocks__/bullmq.ts',
},
setupFilesAfterEnv: ['<rootDir>/backend/__tests__/setup.ts'],
testMatch: [
'**/backend/**/__tests__/**/*.test.ts',
'**/backend/tests/**/*.test.ts',
'**/backend/billing/tests/**/*.test.ts',
'**/backend/billing/tests/**/*.spec.ts',
'**/developer-portal/__tests__/**/*.test.ts',
],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: false,
tsconfig: { strict: false, skipLibCheck: true },
},
],
},
moduleFileExtensions: ['ts', 'js', 'json'],
// Coverage settings — aligned with Stryker break threshold (issue #914)
collectCoverageFrom: [
'backend/**/*.ts',
'!backend/**/*.test.ts',
'!backend/**/*.spec.ts',
'!backend/**/__tests__/**',
'!backend/**/*.d.ts',
'!backend/migrations/**',
'!backend/server.ts',
'!backend/server/**',
],
coverageThreshold: {
global: {
branches: 50,
functions: 60,
lines: 60,
statements: 60,
},
},
coverageReporters: ['text', 'lcov', 'json-summary'],
};