-
Notifications
You must be signed in to change notification settings - Fork 47k
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
support error boundaries on ReactTestRenderer #7558
support error boundaries on ReactTestRenderer #7558
Conversation
Can you make a custom componentDidMount instead of mocking putListener? This current test won't verify that the queue is reset if we were to refactor the events system and how putListener works. Also, no need for the parens within render. |
@spicyj I basically copied this test react/src/renderers/shared/stack/reconciler/__tests__/ReactErrorBoundaries-test.js Lines 60 to 93 in 4f7a38c
would also be good if we had some Edit: I guess I was wrong about the premature abstraction, ReactNativeReconcileTransaction seems to have the same problem. |
Okay, this seems fine then. Interested in sending a follow-up to change both tests as I described? |
(cherry picked from commit 38f74bc)
transaction.checkpoint()
andtransaction.rollback()
was missing fromReactTestReconcileTransaction
; so every time I tried to generate snapshots tests with jest for components that implementedunstable_handleError
I would get the following error:this diff fixes the error