timeoutMs config has been disabled and removed in the following PRs:
So I think it's safe to remove all of them from the tests.
How did you test this change?
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||=||130.15 kB||130.15 kB||=||41.41 kB||41.41 kB|
|oss-experimental/react-dom/cjs/react-dom.production.min.js||=||132.98 kB||132.98 kB||=||42.39 kB||42.39 kB|
|facebook-www/ReactDOM-prod.classic.js||=||414.32 kB||414.32 kB||=||76.58 kB||76.58 kB|
|facebook-www/ReactDOM-prod.modern.js||=||402.91 kB||402.91 kB||=||74.85 kB||74.85 kB|
|facebook-www/ReactDOMForked-prod.classic.js||=||414.32 kB||414.32 kB||=||76.58 kB||76.58 kB|
Includes any change greater than 0.2%:
(No significant changes)
Generated by :no_entry_sign: dangerJS against c399d5b6db46a425d0fa835c9c466c3566a5b0c2
In concurrent roots, instead of checking
jest, we check the new
IS_REACT_ACT_ENVIRONMENT global. The default behavior is
React's own internal test suite use a custom version of
act that works by mocking the Scheduler — rather than the "real" act used publicly. So we don't enable the flag in our repo.
Also adds a warning if
act is called but
IS_REACT_ACT_ENVIRONMENT is not enabled. The goal is to prompt users to correctly configure their testing environment, so that if they forget to use
act in a different test, we can detect and warn about.
It's expected that the environment flag will be configured by the testing framework. For example, a Jest plugin. We will link to the relevant documentation page, once it exists.
The new warning only fires in concurrent roots. Legacy roots will keep the existing behavior.
This is a simple code refactor. There are no changes to functionality or bug fixes it just removes for loops with built-in functions for easier reading and fewer variables being declared.
Making the code more clear and easier to read with fewer lines of code.
yarn test and all tests passed with and without the change. The speed did not change.