-
-
Notifications
You must be signed in to change notification settings - Fork 257
/
jest.config.native.js
46 lines (43 loc) · 1.43 KB
/
jest.config.native.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
37
38
39
40
41
42
43
44
45
46
const {
moduleFileExtensions,
testMatch,
testPathIgnorePatterns,
watchPathIgnorePatterns,
moduleNameMapper,
} = require('./jest.config.base');
const babelConfig = {
presets: [
'module:metro-react-native-babel-preset',
['@babel/preset-env', { targets: { node: 'current' }, modules: 'commonjs' }],
'@babel/preset-typescript',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
],
};
module.exports = {
rootDir: process.cwd(),
moduleFileExtensions,
testMatch,
testPathIgnorePatterns,
watchPathIgnorePatterns,
moduleNameMapper,
testEnvironment: 'jsdom',
preset: 'jest-expo',
transform: {
'\\.(js|jsx|ts|tsx)$': ['babel-jest', babelConfig],
},
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)',
],
setupFiles: [
'<rootDir>/../../node_modules/@shopify/react-native-skia/jestSetup.js',
'<rootDir>/../../node_modules/react-native-gesture-handler/jestSetup.js',
'<rootDir>/../../suite-native/test-utils/src/atomsMock.js',
'<rootDir>/../../suite-native/test-utils/src/expoMock.js',
'<rootDir>/../../suite-native/test-utils/src/walletSdkMock.js',
],
};