Skip to content

Commit

Permalink
Use act in fuzz tester to flush expired work
Browse files Browse the repository at this point in the history
Expired work gets scheduled in a microtask now, so we need to use `act`
to flush it.
  • Loading branch information
acdlite committed Mar 26, 2021
1 parent 34e8ac3 commit 23e563f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ describe('ReactIncrementalTriangle', () => {
assertConsistentTree(activeLeafIndices);
}
// Flush remaining work
Scheduler.unstable_flushAllWithoutAsserting();
ReactNoop.act(() => {
Scheduler.unstable_flushAllWithoutAsserting();
});
assertConsistentTree(activeLeafIndices, expectedCounterAtEnd);
}

Expand Down

0 comments on commit 23e563f

Please sign in to comment.