Closed atrofimenko closed 9 months ago
Hey @atrofimenko, are you upgrading from a previous version of the Braze SDK? We made some internal changes in version 6.0.0 to support the React Native New Architecture. It looks like you may need to update how you import the Braze module. You can refer to our sample test setup here.
@jerielng Thank you! Copied all the content of the file tests/jest.setup.js to my setup and it did not help me
Hey @atrofimenko, are you upgrading from a previous version of the Braze SDK? We made some internal changes in version 6.0.0 to support the React Native New Architecture. It looks like you may need to update how you import the Braze module. You can refer to our sample test setup here.
Changed path to NativeBrazeReactModule and added back transformIgnorePatterns - now it works, thank you!
Awesome, that's great to hear! I'll go ahead and close out this issue, but feel free to open a new one if you have additional questions. Thank you!
Which Platforms?
Both
Which React Native Version?
0.70.5
Which @braze/react-native-sdk SDK version?
8.2.0
Repro Rate
100%
Steps To Reproduce
Example:
import Braze from "@braze/react-native-sdk"
.Expected Behavior
No errors
Actual Incorrect Behavior
Getting this error when trying to run tests After some manipulations with jest config, like: "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|@rneui/.|@gorhom/.|@braze/react-native-sdk)" ], Getting this error: Any thoughts how to fix this?) Thank you.
Verbose Logs
No response
Additional Information
No response