Skip to content
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

[act] flush work correctly without a mocked scheduler #16223

Merged
merged 1 commit into from
Jul 26, 2019

Conversation

threepointone
Copy link
Contributor

Not returning the value of flushPassiveEffects() in flushWork() meant that with async act, we wouldn't flush all work with cascading effects. This PR fixes that oversight, and adds some tests to catch this in the future.

@threepointone threepointone changed the title flush work correctly without a mocked scheduler [act] flush work correctly without a mocked scheduler Jul 26, 2019
@sizebot
Copy link

sizebot commented Jul 26, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK but let's use a slightly simpler fix as discussed

Not returning the value of flushPassiveEffects() in flushWork() meant that with async act, we wouldn't flush all work with cascading effects. This PR fixes that oversight, and adds some tests to catch this in the future.
@threepointone threepointone merged commit d412eec into facebook:master Jul 26, 2019
@threepointone threepointone deleted the verify-act-unmocked branch July 26, 2019 16:48
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
Not returning the value of flushPassiveEffects() in flushWork() meant that with async act, we wouldn't flush all work with cascading effects. This PR fixes that oversight, and adds some tests to catch this in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants