-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
33 lines (33 loc) · 943 Bytes
/
jest.config.js
File metadata and controls
33 lines (33 loc) · 943 Bytes
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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
// Coverage from rule definitions (`src/rules/**/*.ts`) is ~100% because each
// test pack exercises every rule's pattern. The numbers we _care_ about are
// utility, core, and reporter coverage — those gates are intentionally
// tighter so a regression in `redact` or `Posture` will fail CI.
coverageThreshold: {
'./src/utils/redact.ts': {
lines: 90,
functions: 100,
statements: 90,
},
'./src/utils/sarif.ts': {
lines: 90,
functions: 100,
statements: 90,
},
'./src/core/Posture.ts': {
lines: 90,
functions: 100,
statements: 90,
},
},
};