Skip to content

Commit

Permalink
[tests] assertLog before act in ReactDOMServerSelectiveHydration (#28759
Browse files Browse the repository at this point in the history
)

Fixes tests blocking #28737
  • Loading branch information
rickhanlonii committed Apr 11, 2024
1 parent 0de7847 commit 734dd55
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1114,14 +1114,16 @@ describe('ReactDOMServerSelectiveHydration', () => {
// Outer was hydrated earlier
OuterTestUtils.assertLog([]);

// First Inner Mouse Enter fires then Outer Mouse Enter
assertLog(['Inner Mouse Enter', 'Outer Mouse Enter']);

await act(() => {
Scheduler.unstable_flushAllWithoutAsserting();
OuterScheduler.unstable_flushAllWithoutAsserting();
InnerScheduler.unstable_flushAllWithoutAsserting();
});

// First Inner Mouse Enter fires then Outer Mouse Enter
assertLog(['Inner Mouse Enter', 'Outer Mouse Enter']);
assertLog([]);
});
});

Expand Down

0 comments on commit 734dd55

Please sign in to comment.