forked from bitpay/bitpay-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (31 loc) · 1003 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
29
30
31
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFiles: [
'<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js',
'<rootDir>/test/setup.js',
],
transformIgnorePatterns: [
'\\.snap$',
'node_modules/(?!(@freakycoder|@react-native|react-native|@react-navigation|react-navigation-backhandler|react-native-gesture-handler))',
],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.spec.json',
},
},
transform: {
'^.+\\.svg$': 'jest-svg-transformer',
'^.+\\.jsx$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
cacheDirectory: '.jest/cache',
setupFilesAfterEnv: ['<rootDir>/test/afterEnv.ts'],
moduleNameMapper: {
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/test/mock.js',
'\\.(css|less)$': '<rootDir>/test/mock.js',
},
resetMocks: true,
};