-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.cjs
More file actions
36 lines (36 loc) · 939 Bytes
/
Copy pathjest.config.cjs
File metadata and controls
36 lines (36 loc) · 939 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
34
35
36
module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/src'],
// Jest otherwise only measures files imported by tests, hiding untested handlers.
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/index.ts',
'!src/scripts/**',
],
// Temporary honest floor to ratchet back up once handler tests are added (Prompt 5).
coverageThreshold: {
global: {
branches: 88,
functions: 91,
lines: 96,
statements: 94,
},
},
transform: {
'\\.[jt]sx?$': [
'ts-jest',
{ diagnostics: { ignoreCodes: [1324, 151002] }, useESM: false },
],
},
transformIgnorePatterns: ['node_modules/(?!(@inquirer|fast-.+)/)'],
"moduleNameMapper": {
"^(\\.\\.?\\/.+)\\.js$": "$1",
},
coveragePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/src/index.ts',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.cjs'],
};