-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
28 lines (28 loc) · 986 Bytes
/
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
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
globals: {
'ts-jest': {
babelConfig: true,
},
},
setupFiles: [
'./jest/setup.js',
'./node_modules/react-native-gesture-handler/jestSetup.js',
],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'\\.(css|less)$': 'identity-obj-proxy',
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
transformIgnorePatterns: [
'<rootDir>/node_modules/(react-clone-referenced-element|@react-native-community|react-navigation|@react-navigation/.*|@unimodules/.*|native-base|react-native-code-push)',
],
testPathIgnorePatterns: ['<rootDir>/node_modules/', '\\.snap$'],
cacheDirectory: '.jest/cache',
testEnvironment: 'jsdom',
};