Lesson

Generate composite objects with fast-check fc.record

Access
Free
Transcript
Available

fast-check allows us to create composite generators that suit our testing needs. We'll generate two numbers to create a point simulating an X and Y and assert that the distance should always be greater than or equal to 0.