Skip to content

Commit dfc64c6

Browse files
authored
[tests] assertLog before act in ReactUse (#28762)
Fixes tests blocking #28737
1 parent b02199d commit dfc64c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ describe('ReactUse', () => {
663663
}
664664

665665
const root1 = ReactNoop.createRoot();
666+
assertLog(['Async text requested [Hi]']);
667+
666668
await act(() => {
667669
root1.render(<Suspense fallback={<Text text="Loading..." />} />);
668670
});
@@ -677,7 +679,7 @@ describe('ReactUse', () => {
677679
);
678680
});
679681
});
680-
assertLog(['Async text requested [Hi]']);
682+
assertLog([]);
681683

682684
// While we're waiting for the first root's data to resolve, a second
683685
// root renders.

0 commit comments

Comments
 (0)