Skip to content

Commit 23e563f

Browse files
committed
Use act in fuzz tester to flush expired work
Expired work gets scheduled in a microtask now, so we need to use `act` to flush it.
1 parent 34e8ac3 commit 23e563f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ describe('ReactIncrementalTriangle', () => {
432432
assertConsistentTree(activeLeafIndices);
433433
}
434434
// Flush remaining work
435-
Scheduler.unstable_flushAllWithoutAsserting();
435+
ReactNoop.act(() => {
436+
Scheduler.unstable_flushAllWithoutAsserting();
437+
});
436438
assertConsistentTree(activeLeafIndices, expectedCounterAtEnd);
437439
}
438440

0 commit comments

Comments
 (0)