mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[tests] assertLog before act in ReactDOMServerSelectiveHydration (#28759)
Fixes tests blocking https://github.com/facebook/react/pull/28737
This commit is contained in:
@@ -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([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user