Interview practice question
Error states are never tested
Frontend Engineering · Testing and Tooling · Intermediate
You realise none of your tests check what happens when API calls fail. How would you add coverage?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- MSW handlers returning 4xx/5xx, network errors.
- Assert user-facing messages and retry.
- Test partial failures.
- Error boundary tests.
- Make overriding handlers easy per test.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.