-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
42 lines (39 loc) · 993 Bytes
/
jest.config.ts
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
import { defaults } from 'jest-config'
import type { JestConfigWithTsJest } from 'ts-jest'
const config: JestConfigWithTsJest = {
clearMocks: true,
collectCoverageFrom: [
'src/**/*',
// TODO: Write tests for these files when they are less likely to change
'!src/index.ts',
'!src/linters/index.ts',
],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
moduleFileExtensions: ['ts', ...defaults.moduleFileExtensions],
moduleNameMapper: {
'^@Jest(.*)$': '<rootDir>/jest-config$1',
'^@Types(.*)$': '<rootDir>/src/types$1',
'^@Utils(.*)$': '<rootDir>/src/utils$1',
},
modulePathIgnorePatterns: [
'<rootDir>/lib/',
],
setupFilesAfterEnv: [
'<rootDir>/jest-config/setup.ts',
],
transform: {
'^.+\\.(js|ts)$': 'babel-jest',
},
transformIgnorePatterns: [
'./node_modules/(?!(chalk)/)',
]
}
export default config