Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React sync for revisions 568dc35...27c9c95
Summary: Includes a re-implementation of the `act` testing API to decouple it from the mock Scheduler module. Because our Jest configuration mocks the Scheduler for all tests in www, some tests had become accidentally coupled to it. I had to update ~60 test files. The most common pattern I found was people calling `act()` with a no-op function, which had the effect of flushing all pending work. This no longer works in the new implementation. (We will eventually provide a way to opt into Scheduler mocking for advanced cases, but it probably won't be the default.) The fix was usually to wrap an earlier update in `act` to ensure that all its work is fully flushed. --- This sync includes the following changes: - **[27c9c95e2](facebook/react@27c9c95e2)**: act: Bypass microtask for "default sync" updates ([#21740](facebook/react#21740)) //<Andrew Clark>// - **[e577bfb1c](facebook/react@e577bfb1c)**: Add tests for invokeGuardedCallback ([#21734](facebook/react#21734)) //<Dan Abramov>// - **[355591add](facebook/react@355591add)**: Next/experimental release versions include commit date ([#21700](facebook/react#21700)) //<Brian Vaughn>// - **[d7dce572c](facebook/react@d7dce572c)**: Remove internal `act` builds from public modules ([#21721](facebook/react#21721)) //<Andrew Clark>// - **[06f7b4f43](facebook/react@06f7b4f43)**: `act` should work without mock Scheduler ([#21714](facebook/react#21714)) //<Andrew Clark>// - **[422e0bb36](facebook/react@422e0bb36)**: Delete test-utils implementation of `act` ([#21703](facebook/react#21703)) //<Andrew Clark>// Reviewed By: rickhanlonii Differential Revision: D29314763 fbshipit-source-id: 6c53a053e00defee0ab89f30e2f6bd2a1ff29bce
- Loading branch information