-
Notifications
You must be signed in to change notification settings - Fork 25
/
jestconfig.js
43 lines (43 loc) · 1.1 KB
/
jestconfig.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
/* eslint-disable */
module.exports = {
collectCoverageFrom: [
'app/**/*.{js,jsx}',
'!app/**/*.test.{js,jsx}',
'!app/*/RbGenerated*/*.{js,jsx}',
'!app/app.js',
'!app/global-styles.js',
'!app/*/*/Loadable.{js,jsx}',
'!**/coverage/**'
],
reporters: [
'default',
[
'jest-sonar',
{
outputDirectory: 'reports',
outputName: 'test-report.xml',
relativeRootDir: './',
reportedFilePath: 'relative'
}
]
],
coverageThreshold: {
global: {
statements: 50,
branches: 50,
functions: 50,
lines: 50
}
},
preset: 'react-native',
moduleDirectories: ['node_modules', 'app'],
moduleNameMapper: {
'@app(.*)$': '<rootDir>/app/$1',
'@(atoms|molecules|organisms)(.*)$': '<rootDir>/app/components/$1/$2',
'@(containers|components|services|utils|themes|scenes|navigators)(.*)$':
'<rootDir>/app/$1/$2'
},
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
setupFilesAfterEnv: ['./setupTests.js'],
transformIgnorePatterns: ['/node_modules/(?!react-native)/.+']
};