Writing Properties
Learn to write property-based tests.
We'll cover the following...
As we saw in our initial examples, part of property-based testing is generating data and the other part is coming up with properties. In this and the next lessons, we’re going to focus on the latter.
Shape of inputs
The first thing to do when coming up with properties is to figure out the shape of valid inputs that our code works with.
“Shape“ is not a technical term or a definition: we’re using it to describe the space of possible values that the input can be, ...