-
Notifications
You must be signed in to change notification settings - Fork 48
/
jest.config.js
27 lines (27 loc) · 1009 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
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/(?!(@walletconnect/react-native-compat|@freakycoder|@react-native|react-native|(react-native(-.*))|@react-navigation|(react-navigation(-.*))|victory|(victory(-.*))))',
],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'ts-jest',
'^.+\\.svg$': 'jest-transform-stub',
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
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',
'@/(.*)': '<rootDir>/src/$1',
'@test/(.*)': '<rootDir>/test/$1',
},
roots: ['<rootDir>/src/'],
};