-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
40 lines (39 loc) · 1.29 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.js?(x)',
'!src/*.js?(x)',
'!src/**/index.js',
'!src/**/*.mock.js',
'!src/**/test*',
],
coveragePathIgnorePatterns: ['/node_modules/', '/config/', '/coverage/'],
coverageReporters: ['html', 'text', 'lcov', 'text-summary'],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'\\.svg$': '<rootDir>/config/fileTransformer.js',
},
transformIgnorePatterns: ['node_modules/(?!(carbon-components|recharts|@carbon/charts))'],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^dnd-core$': 'dnd-core/dist/cjs',
'^react-dnd$': 'react-dnd/dist/cjs',
'^react-dnd-html5-backend$': 'react-dnd-html5-backend/dist/cjs',
'^react-dnd-touch-backend$': 'react-dnd-touch-backend/dist/cjs',
'^react-dnd-test-backend$': 'react-dnd-test-backend/dist/cjs',
'^react-dnd-test-utils$': 'react-dnd-test-utils/dist/cjs',
},
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
};