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 authored Apr 10, 2024
1 parent e36ee76 commit 88df524
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 88df524

Please sign in to comment.