Testing · Junior · Question 72 of 78
Which of these is the best candidate for a unit test?
- ✓Correct answer: A pure function that formats prices with currency and rounding
- 2The layout of a landing page
- 3The whole checkout flow with payment
Explanation
Pure functions with many edge cases are cheap to test thoroughly with unit tests.