elm-explorations / elm-explorations/test
uncommon `Int` expectations handled unexpectedly
Open
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
`elm-test` thinks `Int`s are `Float`s with
- `Infinity`
- `-Infinity`
```elm
((1 / 0) |> round) |> Expect.equal ((1 / 0) |> round)
```
> Do not use Expect.equal with floats. Use Float.within instead.
`elm-test` doesn't complain on
- different versions of `NaN` (which are always correctly reported as "expectation hasn't been met")
- fractions (created from `n ^ -x`) (this is kinda surprising)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.