forked from trezor/trezor-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.native.js
43 lines (40 loc) · 1.35 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
const {
moduleFileExtensions,
testMatch,
testPathIgnorePatterns,
watchPathIgnorePatterns,
} = 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,
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/.*|@unimodules/.*|unimodules|sentry-expo|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/setupReactReanimatedMock.js',
'<rootDir>/../../suite-native/test-utils/src/atomsMock.js',
],
};