Get the latest tech news
Elm Test Distributions
…in which I’ll tell you how you can make sure your property based tests are testing the interesting cases.
Now if we were worried we’re not testing very interesting cases, we could debug-print their lengths and look at the logs real hard and make a gut decision about whether it’s fine, but doesn’t that feel a bit icky? It’s a relatively new addition to the Elm test library API (added in v2.0.0, has been 3 years already, wow) which lets you measure or alternatively enforce how often each interesting case needs to happen. Before I get to the actual Test.Distribution stuff, let me also say that in addition to the Fuzz.examples mentioned earlier there’s also Fuzz.labelExamples which you can use in the REPL to see an example of each labelled case (if it occurs):
Or read this on Hacker News