- SDK Version: 47
- Platforms(Android/iOS/web/all): Android/IOS
Hello everyone,
I have an issue with jest-expo
and expo-constants
. It seems that my expo-constants
object is undefined in my tests. I am using some extra
variable in my app.config.ts
and their are all undefined, that make my tests fail.
The problem with the constants only occure with tests and is working perfectly when launching the app.
My jest config in package.json
:
"jest": {
"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)"
]
},
Is this a known problem ? My problem looks like this issue Jest Constants.manifest.extra undefined but I couln’t find an answer on it.