I'm looking for a way to test a React.Suspense fallback using react-testing-library. Consider this example:
const MyLazyThing = lazy(() => import('./index'));
export default function MyThing(props) {
return (
<Suspense fallback="loading...">
<MyLazyThing {...props} />
</Suspense>
);
}
using getByText('loading...')
doesn't seem to work. wondering if there's a good way to test this in RTL.
thx