Skip to content

Conversation

@acdlite
Copy link
Collaborator

@acdlite acdlite commented Apr 12, 2023

Many of our Suspense-related tests were written before the act API was introduced, and use the lower level waitFor helpers instead. So they are less resilient to changes in implementation details than they could be.

This converts some of our test suite to use act in more places. I found these while working on a PR to expand our fallback throttling mechanism to include all renders that result from a promise resolving, even if there are no more fallbacks in the tree.

I think this covers all the remaining tests that are affected.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 12, 2023
@react-sizebot
Copy link

react-sizebot commented Apr 12, 2023

Comparing: 5426af3...8b31a49

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 164.40 kB 164.40 kB = 51.65 kB 51.65 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 166.84 kB 166.84 kB = 52.30 kB 52.30 kB
facebook-www/ReactDOM-prod.classic.js = 565.32 kB 565.32 kB = 99.49 kB 99.49 kB
facebook-www/ReactDOM-prod.modern.js = 549.11 kB 549.11 kB = 96.79 kB 96.79 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 8b31a49

@acdlite acdlite requested review from gnoff and rickhanlonii April 12, 2023 15:18
Many of our Suspense-related tests were written before the `act` API was
introduced, and use the lower level `waitFor` helpers instead. So they
are less resilient to changes in implementation details than they could
be.

This converts some of our test suite to use `act` in more places. I
found these while working on a PR to expand our fallback throttling
mechanism to include all renders that result from a promise resolving,
even if there are no more fallbacks in the tree.

I think this covers all the remaining tests that are affected.
@acdlite acdlite force-pushed the convert-suspense-tests-act-2 branch from 36f495d to 8b31a49 Compare April 12, 2023 15:41
@acdlite acdlite merged commit 72c890e into facebook:main Apr 12, 2023
kassens added a commit to kassens/react that referenced this pull request Apr 17, 2023
kassens pushed a commit that referenced this pull request Apr 21, 2023
Many of our Suspense-related tests were written before the `act` API was
introduced, and use the lower level `waitFor` helpers instead. So they
are less resilient to changes in implementation details than they could
be.

This converts some of our test suite to use `act` in more places. I
found these while working on a PR to expand our fallback throttling
mechanism to include all renders that result from a promise resolving,
even if there are no more fallbacks in the tree.

I think this covers all the remaining tests that are affected.
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
Many of our Suspense-related tests were written before the `act` API was
introduced, and use the lower level `waitFor` helpers instead. So they
are less resilient to changes in implementation details than they could
be.

This converts some of our test suite to use `act` in more places. I
found these while working on a PR to expand our fallback throttling
mechanism to include all renders that result from a promise resolving,
even if there are no more fallbacks in the tree.

I think this covers all the remaining tests that are affected.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
Many of our Suspense-related tests were written before the `act` API was
introduced, and use the lower level `waitFor` helpers instead. So they
are less resilient to changes in implementation details than they could
be.

This converts some of our test suite to use `act` in more places. I
found these while working on a PR to expand our fallback throttling
mechanism to include all renders that result from a promise resolving,
even if there are no more fallbacks in the tree.

I think this covers all the remaining tests that are affected.

DiffTrain build for commit 72c890e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants