Testing · Senior · Question 40 of 75
How do you test Suspense with data loading in a component test?
- ✓Correct answer: Assert the fallback first, then
await findBy…the resolved content, with the network mocked by MSW - 2Mock
Suspenseto render children immediately - 3Suspense can't run in jsdom
Explanation
This checks both states the user sees without depending on how data fetching is implemented.