Testing · Junior · Question 10 of 78
What should a test check - behaviour or implementation details?
- ✓Correct answer: Behaviour visible to the user or caller, so refactoring doesn't break tests
- 2Internal state and private methods, to be as precise as possible
- 3The exact number of re-renders
Explanation
Tests tied to implementation details fail on safe refactors (false negatives) and can pass when the user-visible result is broken (false positives).