mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
0fa8f92b991d86b525d6ef4bddbbeb3b7473756c
Based on a bug report from @bvaughn.
`act` should not consult `shouldYield` when it's performing work,
because in a unit testing environment, I/O (such as `setTimeout`) is
likely mocked. So the result of `shouldYield` can't be trusted.
In the regression test, I simulate the bug by mocking `shouldYield` to
always return `true`. This causes an infinite loop in `act`, because it
will keep trying to render and React will keep yielding.
DiffTrain build for [49f7410467](https://github.com/facebook/react/commit/49f7410467950de57bd1d9509e67de91185f7bad)
Please do not delete this branch
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%