Skip to content

Expect.equalUnder fn #231

@Janiczek

Description

@Janiczek

Apply a function to both actual and expected before comparing them:

expectEqualUnder : (a -> b) -> a -> a -> Expectation
expectEqualUnder f a2 a1 =
    f a1
        |> Expect.equal (f a2)

Example of usage:

str
  |> thereAndBack
  |> expectEqualUnder String.trim str

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions