The Test.checkN functions work much like the Test.fuzzN functions from elm-test, except
you pass Generator values instead of Fuzzer values and the description is passed first (I
personally think it reads better that way).
Internally, the given generators will be:
Fuzzer using Fuzz.fromGeneratorTest.fuzzIf you need to write tests with more than 8 inputs or otherwise need more flexibility, you can
use this function. Instead of passing value generators and an expectation function separately, you
use whatever functionality you want to build up a Generator Expectation and then test that.
For example,
Test.Random.check2 "My test"
firstGenerator
secondGenerator
Expect.equalcould be written as
Test.Random.checkExpectation "My test" <|
Random.map2 Expect.equal
firstGenerator
secondGeneratorwhere existing Random functionality (in this case Random.map2) is used to convert a couple of
value generators into an Expectation generator.