Testing · Senior · Question 13 of 75
What is property-based testing (e.g. fast-check)?
- ✓Correct answer: Checking that a property holds for many generated inputs; on failure the tool shrinks the input to a minimal example
- 2Testing object properties with
toHaveProperty - 3Testing React props
Explanation
Example: decode(encode(x)) === x for any string. It finds edge cases people don't think of.