QuickCheck is a Haskell library for randomized property-based testing. You describe properties that a pure program should satisfy, and it generates many test cases, reporting which cases pass or fail. section 6.4
Property-based testing with QuickCheck:
- Starts with a referentially transparent specification rather than a fixed list of examples. section 6.4
- Generates a large permutation of inputs to exercise possible output paths and expose invalid properties. section 6.4
- Supports refactoring by checking that new code continues to satisfy the stated properties. section 6.4
JavaScript analogue
JSCheck mirrors QuickCheck by combining a property, generated inputs, and a verdict function. A grade test generates arrays of numbers between 90 and 100, checks that computeAverageGrade returns “A,” and reports 100 passing cases.


