elm-explorations / test

Write unit and fuzz tests for Elm code.
https://package.elm-lang.org/packages/elm-explorations/test/latest
BSD 3-Clause "New" or "Revised" License
236 stars 40 forks source link

Slight improvement to examples #183

Closed gampleman closed 2 years ago

gampleman commented 2 years ago

This makes it so that Fuzz.examples produces more variety of example, since it can use the first argument as the seed.

Janiczek commented 2 years ago

Thanks, a nice idea - something between the original and "full two degrees of freedom" - having a separate parameter for the seed.

Do you think it warrants updating all the examples REPL runs in other functions' doc comments? All the things like

    > import Fuzz
    > Fuzz.examples 20 (Fuzz.intRange 20 50)
    [27,25,21,24,29,40,31,23,34,28,28,47,22,36,35,38,33,32,34,29]
        : List Int

that are now going to return different data.

gampleman commented 2 years ago

Ugh that's what we'd want elm-verify-examples for...

Yeah I can do that.

Janiczek commented 2 years ago

Sorry 🙈

Janiczek commented 2 years ago

Actually I grepped the codebase and I thought there will be a bunch, but there's none apart from this examples function itself?