-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
Fix shallow renderer callbacks #10106
Conversation
…tate's callback arg
…ny callbacks passed. (#10089)
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.
Thank you @codepodu and @Leeds-eBooks for this work!
|
||
// No longer a public API, but we can test that it works internally by | ||
// reaching into the updater. | ||
shallowRenderer._updater.enqueueReplaceState( |
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.
Wish we had a better way to test this~ but there's precedent in at least a half dozen other tests so it's probably okay. 😁
It was merged on July 10th, which was in between the last 16 alpha release and the first beta release I think. Not that you'd be interested in installing either. This fix is in all of the 16.x final releases though. |
It's not working for me - Using
Will investigate more and try to pinpoint the issue |
Open a new issue with repro steps if you're convinced it's still an issue. 😄 PR #10106 did add tests for this though, FWIW. |
The library I'm depending on is still pointing to the older version of All is good. Sorry about the false alarm. |
Shallow renderer now executes any callbacks passed to setState/replaceState/forceUpdate.
Fixes #10089
I've incorporated failing tests provided in #10092 by @Leeds-eBooks.