-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
43 lines (43 loc) · 1.2 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
37
38
39
40
41
42
43
module.exports = {
cacheDirectory: '.jest-cache',
coverageDirectory: '.jest-coverage',
sourceRoot: './packages/src',
coveragePathIgnorePatterns: [
'<rootDir>/packages/(?:.+?)/lib/',
'<rootDir>/packages/(?:.+?)/node_modules/',
'<rootDir>/node_modules/',
'\\*resultsTestResource.js$',
],
coverageReporters: ['html', 'text', 'lcov'],
coverageThreshold: {
global: {
branches: 20,
functions: 25,
lines: 25,
statements: 25,
},
},
transform: {
'^.+\\.json5$': 'json5-jest',
'^.+\\.js$': 'babel-jest',
'.+\\.(css|styl|less|sass|scss)$': 'jest-transform-css',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
},
testPathIgnorePatterns: [
'<rootDir>/packages/(?:.+?)/lib/',
'<rootDir>/packages/(?:.+?)/node_modules/',
'<rootDir>/cypress/',
'\\*.(css|jpg|png|scss|less|sass)$',
'\\*resultsTestResource.js$',
],
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
moduleFileExtensions: ['json', 'js', 'ts', 'tsx'],
moduleDirectories: [
'node_modules',
'packages/shared/node_modules',
'packages/react-ui/node_modules',
'packages/react-ui/src',
'packages/shared/src',
],
};