Testing · Junior · Question 27 of 78
Why is it useful that each test is independent?
- ✓Correct answer: Tests can run in any order or in parallel, and a failure points to one cause
- 2It makes tests run in alphabetical order
- 3It removes the need for
expect
Explanation
Shared mutable state between tests causes order-dependent failures that are hard to debug. Reset state in beforeEach.