-
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
Shallow renderer: support multiple setState
invocation
#11167
Conversation
cc @bvaughn who I believe originally wrote it. Looks good to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while since I've thought about this component too closely 😁 but this change looks good to me. I appreciate the newly-added tests.
@Hypnosphi Could you please also get a local clone of Enzyme running and verify that patching this up in |
I did: # in react directory
yarn build
cd build/packages/react-test-renderer
yarn link
cd ../../../.. # parent of react directory
git clone https://github.com/airbnb/enzyme.git
cd enzyme
yarn
yarn react:16
yarn link react-test-renderer
yarn test:only And it passes |
Sweet. Thanks. |
Issue: #11161
This PR ensures that subsequent calls to
setState
:setState
as base state when shallow merging