-
Notifications
You must be signed in to change notification settings - Fork 12
/
jest.config.js
43 lines (42 loc) · 1.24 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
/**
* @fileOverview jest configuration
* @name jest.config.js
*/
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/**/*.test.{js,jsx}',
'!src/*/RbGenerated*/*.{js,jsx}',
'!src/App.js',
'!src/globalStyles/*',
'!src/*/*/Loadable.{js,jsx}',
],
coverageReporters: ['lcov', 'text'],
coverageThreshold: {
global: {
// coverage needs to met to pass the test
// statements: 98,
// branches: 91,
// functions: 98,
// lines: 98,
statements: 0,
branches: 0,
functions: 0,
lines: 0,
},
},
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules',
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/internals/mocks/image.js',
},
setupFilesAfterEnv: [
'<rootDir>/internals/testing/test-bundler.js',
'@testing-library/react/cleanup-after-each',
'@testing-library/jest-dom/extend-expect',
'<rootDir>/internals/testing/mount-webpack-defineplugin-envs.js',
],
setupFiles: ['raf/polyfill', '<rootDir>/internals/testing/mock-store.js'],
testRegex: 'tests/.*\\.test\\.js$',
snapshotSerializers: [],
};