[test] Correctly identify what the raf
helper is for
#29683
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
requestAnimationFrame
may have been important in earlier implementations for@popperjs/core
. But now@popperjs/core
only relies on microtasks for batching state updates.So let's just flush the state update (wrapped in act). This significantly simplifies the test since we use less helpers and can re-use the same (fake) clock as the other tests in this suite.
React 17 browser run: https://app.circleci.com/pipelines/github/mui-org/material-ui/56264/workflows/8a04eba7-a91c-4dc3-b477-35df19bfe3f5
React 18 browser run (failures are unrelated): https://app.circleci.com/pipelines/github/mui-org/material-ui/56266/workflows/8e18b4b2-0da2-48da-90f2-45c26c85cc2a