-
Notifications
You must be signed in to change notification settings - Fork 273
ExceptionsManager.handleException is not a function #532
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
Comments
This library has nothing to do with LogBox, nor ExceptionsManager. Make sure to use "react-native" Jest preset and mock the native module if necessary. Looks like ExceptionsManager is already mocked, but |
@thymikee Trying to deal with this too (discussing on RN GH) - can you help me understand why some parts of RN are mocked by RNTL but not others? E.g. LogBox is but not ExceptionManager. Is that b/c LogBox is a Component? RNTL has this:
But not something like this:
It also seems odd that despite LogBox being apparently mocked by RNTL, these errors still appear... perhaps because LogBox/LogBox is mocked but LogBox/Data is not. Not sure if the RNTL team would consider that in scope or not.
FYI we can get around this issue ok by moving this line to the top of LogBoxData.js in node_modules/react-native:
And adding this to the mocks in
|
RNTL provides no mocks on its own, where did you get that information from? It's |
Ah somehow I hallucinated that 🙂 thanks for the info!! |
I tried to avoid edit the LogBoxData.js and this solved my problem. :) |
Describe the bug
We recently upgraded to React Native 0.63, Jest 26, and React Native Testing Library 7. When running jest with
--runInBand
we have noticed the following error randomly in our CI:I noticed a similar error in the previous project: testing-library/native-testing-library#132
Any thoughts?
Expected behavior
No errors.
Versions
The text was updated successfully, but these errors were encountered: