-
Notifications
You must be signed in to change notification settings - Fork 47.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flush work on exiting outermost act(), with nested act()s from differ…
…ent renderers Given this snippet: ```jsx TestRenderer.act(() => { TestUtils.act(() => { TestRenderer.create(<Effecty />); }); }); ``` We want to make sure that all work is only flushed on exiting the outermost act(). Now, naively doing this based on actingScopeDepth would work with a mocked scheduler, where flushAll() would flush all work across renderers. This doesn't work without mocking the scheduler though; and where flushing work only works per renderer. So we disable this behaviour for a non-mocked scenario. This seems like an ok tradeoff.
- Loading branch information
1 parent
03944bf
commit 33b6b43
Showing
4 changed files
with
234 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.