diff --git a/tests/react/utils/useHydrateAtoms.test.tsx b/tests/react/utils/useHydrateAtoms.test.tsx index 2b72a923a8..bfa3c8b527 100644 --- a/tests/react/utils/useHydrateAtoms.test.tsx +++ b/tests/react/utils/useHydrateAtoms.test.tsx @@ -50,12 +50,10 @@ it('useHydrateAtoms should only hydrate on first render', async () => { ) } - const { rerender } = await Promise.resolve( - render( - - - , - ), + const { rerender } = render( + + + , ) await screen.findByText('count: 42') @@ -106,12 +104,10 @@ it('useHydrateAtoms should only hydrate on first render using a Map', async () = ) } - const { rerender } = await Promise.resolve( - render( - - - , - ), + const { rerender } = render( + + + , ) await screen.findByText('count: 42') @@ -213,12 +209,10 @@ it('useHydrateAtoms can only restore an atom once', async () => { ) } - const { rerender } = await Promise.resolve( - render( - - - , - ), + const { rerender } = render( + + + , ) await screen.findByText('count: 42') @@ -301,12 +295,10 @@ it('passing dangerouslyForceHydrate to useHydrateAtoms will re-hydrated atoms', ) } - const { rerender } = await Promise.resolve( - render( - - - , - ), + const { rerender } = render( + + + , ) await screen.findByText('count: 42') diff --git a/tests/react/vanilla-utils/loadable.test.tsx b/tests/react/vanilla-utils/loadable.test.tsx index 888ec6d84c..80ffb10742 100644 --- a/tests/react/vanilla-utils/loadable.test.tsx +++ b/tests/react/vanilla-utils/loadable.test.tsx @@ -162,14 +162,12 @@ it('loadable can use resolved promises synchronously', async () => { return
Ready
} - const { rerender } = await Promise.resolve( - render( - - - - - , - ), + const { rerender } = render( + + + + + , ) if (IS_REACT18 || IS_REACT19) {