-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot destructure property 'config' of 'options' as it is undefined. #743
Comments
@pouyarahmti React Native is using I'm using jest 27 with yarn resolutions on my package.json
if it does not work for you, maybe you should downgrade to jest 26 for now |
It didn't work with resolutions but with downgrading to jest 26 everything was running okay. Thanks for your help |
See: facebook/react-native#30637. Closing. As a workaround, you can use Yarn's |
The solution from @b3coded worked for me, but the necessary step was to remove/add (update) jest package in the project. |
@pouyarahmti 's solution worked for me. Had to go to version 26. Basically this means that jest's |
* Upgrade expo sdk 44 * Update webpack config * Fix cannot destructure config err Refer callstack/react-native-testing-library#743 * Downgrade svgr to 5 This is only compatible with webpack 5 but expo-cli is still using 4. * Fix tests downgrading `jest-expo` to 43 * Tested with jest-expo 44.0.0
Fixes warning when running tests "TypeError: Cannot destructure property 'config' of 'options' as it is undefined" See callstack/react-native-testing-library#743
For expo users, you can just |
maybe it will help someone in 2022. {
"devDependencies" : {
"jest": "^29.3.1",
"babel-jest": "^29.3.1",
// should not raise error in runtime but fresh types are fresh
"@types/jest": "^29.2.3",
"ts-jest": "^29.0.3",
}
} |
Ask your Question
Hi, I have installed React Native Testing Library and i wanted to test React Navigation as the docs has explained. But i got an error which says TypeError: Cannot destructure property 'config' of 'options' as it is undefined. I wonder if you could help me fix it.
ReactNative: 0.64.1
Jest: 27.0.3
ReactNativeTesting Library: 7.2.0
The text was updated successfully, but these errors were encountered: