Testing · Senior · Question 59 of 75
When is verifying interactions (that a mock was called) the right assertion?
- ✓Correct answer: When the call itself is the outcome - sending analytics, an email, a payment request at a boundary
- 2Always - it's the most precise assertion
- 3Never - always check state
Explanation
For internal collaborators, prefer checking the observable result.