-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
34 lines (30 loc) · 1018 Bytes
/
jest.config.ts
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
import type { JestConfigWithTsJest } from 'ts-jest'
const untranspiledModulePatterns = [
"(jest-)?react-native",
"@react-native-community",
"expo(nent)?",
"@expo(nent)?/.*",
"react-navigation",
"@react-navigation/.*",
"@unimodules/.*",
"unimodules",
"sentry-expo",
"native-base",
"react-native-svg",
"@react-native*"
];
const jestConfig: JestConfigWithTsJest = {
preset: "jest-expo",
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)"
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
transform: {
'^.+/((@)?react-native)/.+\\.(js|jsx)$': 'babel-jest',
'^.+\\.(js|ts|jsx|tsx)$': '@swc/jest',
},
moduleNameMapper: {
'^react-native$': 'react-native-web',
}
};
export default jestConfig;