forked from Jm-Zion/rn-wave-bottom-bar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (36 loc) · 1.16 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
module.exports = {
preset: 'react-native',
testEnvironment: 'jsdom',
globals: {
'ts-jest': {
diagnostics: false,
babelConfig: true,
},
atob: true,
},
moduleDirectories: ['node_modules', 'src'],
testPathIgnorePatterns: ['\\.snap$', '<rootDir>/node_modules/'],
coveragePathIgnorePatterns: [
'node_modules',
'test-config',
'<rootDir>/src/assets/',
'<rootDir>/src/tests-utils/',
],
modulePathIgnorePatterns: ['<rootDir>/lib/'],
moduleNameMapper: {
'^@theme/(.*)': '<rootDir>/src/theme/$1',
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', '.js.map'],
transform: {
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': 'ts-jest',
},
transformIgnorePatterns: [
'node_modules/(?!(react-native|react-native-screens|@react-native-community|@react-navigation|react-native-paper|react-native-vector-icons|react-native-paper|react-native-reanimated|react-native-safe-area-view|react-native-gesture-handler)/)',
],
verbose: true,
bail: true,
setupFiles: ['./setupTest.ts'],
cacheDirectory: '.jest/cache',
};