Property tests find the input you would not have thought of
For a parser, a serialiser, or anything with an inverse, the property "decode(encode(x)) equals x for all x" finds the edge case an example test never would.
fc.assert(fc.property(fc.string(), (s) => decode(encode(s)) === s));fast-check generates thousands of inputs and shrinks a failure to the smallest one. Empty strings, surrogate pairs and a lone backslash turn up on the first run.
testing