Testing · Middle · Question 27 of 75
How do you test a component that reads from a Redux store?
- ✓Correct answer: Render it with a real store created by the app's
configureStore(with preloaded state), and assert on the UI - 2Mock
useSelectorto return fixed values - 3Test the reducer only
Explanation
Redux docs recommend integration tests with a real store: they check reducers, selectors and components together.