-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
70 lines (69 loc) · 1.71 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = {
preset: 'react-native',
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'babel-jest',
},
transform: {
'^.+\\.(t|j)sx?$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFilesAfterEnv: ["@testing-library/jest-native/extend-expect"],
transformIgnorePatterns: [
"node_modules/(?!(jest-)?@react-native|react-native|@react-native-community|@react-native-picker|@inspire-app)",
],
setupFiles: [
],
collectCoverageFrom: [
'src/**/*.{js,jsx,ts}',
'!src/**/{translations,styles,types,constants,containers,assets,navigation}/**',
'!src/**/styles.ts',
'!src/core/network/**/*',
'!**/node_modules/**',
'!src/core/store/**/index.ts',
'!src/core/store/bar/**/.ts',
'!src/core/store/storeConfiguration.ts',
'!App.tsx'
],
globals: {
__DEV__: true
},
coverageThreshold: {
global: {
branches: 60,
functions: 50,
lines: 70,
statements: 70,
},
'./src/util/hooks/**/*.ts': {
branches: 100,
functions: 75,
lines: 75,
statements: 75,
},
'./src/util/methods/**/*.ts': {
branches: 100,
functions: 75,
lines: 75,
statements: 75,
},
// Set coverage for slices and async thunks here
// './src/core/store/**/*.thunk.ts': {
// branches: 75,
// functions: 75,
// lines: 75,
// statements: 75,
// },
// './src/core/store/**/*.slice.ts': {
// branches: 75,
// functions: 75,
// lines: 75,
// statements: 75,
// },
'./src/core/selectors/*.ts': {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
};