-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (35 loc) · 1.15 KB
/
jest.config.js
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
process.env.TZ = 'UTC';
module.exports = {
roots: [
'<rootDir>/packages/collections/src',
'<rootDir>/packages/components/src',
'<rootDir>/packages/form/src',
'<rootDir>/packages/theme/src',
'<rootDir>/packages/utils/src'
],
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', 'jest-styled-components', './jest.setup.js'],
testRegex: '.*.test.(ts|tsx)?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^collections/(.*)': '<rootDir>/packages/collections/src/$1',
'^components/(.*)': '<rootDir>/packages/components/src/$1',
'^form/(.*)': '<rootDir>/packages/form/src/$1',
'^theme/(.*)': '<rootDir>/packages/theme/src/$1',
'^utils/(.*)': '<rootDir>/packages/utils/src/$1',
'^react$': '<rootDir>/node_modules/react',
'^react-dom$': '<rootDir>/node_modules/react-dom'
},
coverageReporters: ['json', 'lcov', 'text', 'clover', 'text-summary', 'cobertura'],
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*/private/utils/tests/**/*', '!**/*/index.ts'],
coverageThreshold: {
global: {
statements: 0,
branches: 0,
functions: 0,
lines: 0
}
}
};