elm-explorations / elm-explorations/test
Expect.equalUnder fn
Open
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Apply a function to both `actual` and `expected` before comparing them:
```elm
expectEqualUnder : (a -> b) -> a -> a -> Expectation
expectEqualUnder f a2 a1 =
f a1
|> Expect.equal (f a2)
```
Example of usage:
```elm
str
|> thereAndBack
|> expectEqualUnder String.trim str
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.