-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (32 loc) · 881 Bytes
/
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
module.exports = {
collectCoverageFrom: [
'server/**/*.{js,jsx}',
'app/**/*.{js,jsx}',
'!app/**/*.test.{js,jsx}',
'!app/*/RbGenerated*/*.{js,jsx}',
'!app/app.js',
'!app/*/*/Loadable.{js,jsx}',
],
testPathIgnorePatterns: [
'<rootDir>/dist/',
'<rootDir>/node_modules/',
'<rootDir>/coverage/',
],
coverageThreshold: {
global: {
statements: 0.1,
branches: 0.1,
functions: 0,
lines: 0.1,
},
},
coverageReporters: ['json', 'lcov', 'text-summary'],
moduleDirectories: ['node_modules'],
moduleNameMapper: {
'.*\\.(css)$': '<rootDir>/config/jest-mocks/cssModule.js',
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/config/jest-mocks/image.js',
},
setupFilesAfterEnv: ['<rootDir>/config/test-setup.js'],
testEnvironment: 'jsdom',
};