Hey Alex! I believe that fuzz testing is a great tool. At the same time I’m not sure what’s the return on investment when applied to simple, small, declarative functions.
For example I could fuzz the following functions but I’m not sure that would add much value.
type MyType = { one : Int, two : Int }
getOne : MyType -> Int
getOne { one } = one
updateOne : Int -> MyType -> MyType
updateOne i myValue = { myValue | one = i }
That’s a simplistic example but I don’t find my Elm code getting much more complex than that. When it does I do believe unit testing is a great tool. When it doesn’t maybe it’s better to reach for other techniques (e.g. code inspection)?
What do you think about that? Do you have a specific strategies when testing Elm code?