Testing · Middle · Question 68 of 75
Why is deep nesting of describe blocks with shared let variables problematic?
- ✓Correct answer: To understand one test you must read many hooks above it; inline setup or small helper functions are clearer
- 2Jest limits nesting to 3 levels
- 3It makes tests run in series
Explanation
Kent C. Dodds: prefer flat tests with explicit setup functions (“Avoid Nesting when you're Testing”).