Closed Janiczek closed 1 year ago
I'm curious, why have the Distribution
module (ex Coverage
) be inside Test
instead of inside Fuzz
? is this because of some import cycle issues?
@mpizenberg I'd say it could live in either! I guess I put it into Test directory to be closer to the Test.fuzzWith
(that's where the values will be used), but I could imagine
Test.fuzzWith
{ runs = 1000
, distribution =
Test.expectDistribution
[ Fuzz.Distribution.atLeast 5 "balanced" Tree.isBalanced
-- ^^^^
]
}
treeFuzzer
"Assert something about trees"
(\tree -> Expect.foo)
WDYT, does it read better, should it belong there?
I asked this mostly for the purpose of API documentation. I'd expect this feature documentation to be located close to Fuzz documentation. If it better fits the documentation flow in the Test namespace, let's leave it there, and maybe add a "Fuzz" prefix as Lue suggests. If it better fits within the Fuzz module doc, maybe we move it there?
PS I haven't read the API docs of the new API so I may be totally wrong.
On Tue, Oct 11, 2022, 00:29 lue @.***> wrote:
Test.FuzzDistribution?
— Reply to this email directly, view it on GitHub https://github.com/elm-explorations/test/pull/202#issuecomment-1273873848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFOCNFGVKXBOQSP5ECTMLWCSKEFANCNFSM6AAAAAARBVXMKM . You are receiving this because you were mentioned.Message ID: @.***>
@mpizenberg Here are the API docs (only those relevant to distribution):
Based on a last-minute discussion in the Incremental Elm Discord #elm-test channel and a poll in the Elm Slack #testing channel.