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
237 stars 39 forks source link

Update `Expect.ok` and `Expect.err` documentation #148

Closed marc136 closed 4 years ago

marc136 commented 4 years ago

Hello, it seems like the description of ok was a direct copy of the description of err, so I swapped the words and updated the result.

Also, the String.toInt in elm 0.19 returns a Maybe (see docs), so I added a Result.fromMaybe to the examples.

If I should split it into two commits, please say so.

drathier commented 4 years ago

Good catch, thanks!

Maybe long-term finding a function that actually returns a Result for the docs example is good, like a json decoder.