-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
49 lines (47 loc) · 1.17 KB
/
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
43
44
45
46
47
48
49
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
const jestConfig = {
clearMocks: true,
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/typings.d.ts',
'!src/index.min.ts',
'!src/**/index.ts',
'!src/**/*.less',
'!**/node_modules/**'
],
coverageThreshold: {
global: {
branches: 85,
functions: 90,
lines: 90,
statements: 90
}
},
coverageReporters: [
'text',
'lcov',
'cobertura'
],
moduleNameMapper: {
'@ln\\/(.*)\\.js': '<rootDir>/__mocks__/locale.js',
'^.+\\.less$': '<rootDir>/__mocks__/less.js',
'antd\\/es': ['<rootDir>/node_modules/antd'],
'@ant-design\\/icons\\/es\\/icons': ['<rootDir>/node_modules/@ant-design/icons']
},
testEnvironment: 'jsdom',
transform: {
'\\.[jt]sx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$',
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
transformIgnorePatterns: [
'node_modules/(?!(@open-wc|@lit|lit|lit-html|lit-element)/)'
],
setupFilesAfterEnv: [
'./src/testSetup.ts'
]
}
export default jestConfig