-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathjest.config.js
34 lines (33 loc) · 1.01 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
const {defaults: tsJestConfig} = require('ts-jest/presets');
module.exports = {
...tsJestConfig,
clearMocks: true,
preset: 'react-native',
transform: {
...tsJestConfig.transform,
'\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
},
transformIgnorePatterns: ['node_modules/(?!(@react-native|react-native)/)'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
modulePaths: ['<rootDir>'],
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['js', 'ts', 'tsx'],
globals: {
'ts-jest': {
babelConfig: true,
},
},
modulePathIgnorePatterns: [
'<rootDir>/lib/',
'<rootDir>/node_modules/',
'<rootDir>/.history/',
],
cacheDirectory: '.jest/cache',
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
testPathIgnorePatterns: ['\\.snap$', '<rootDir>/node_modules/'],
haste: {
defaultPlatform: 'ios',
platforms: ['android', 'ios', 'native'],
},
coveragePathIgnorePatterns: ['/node_modules/', '__tests__'],
};