Skip to content

Expect.equalUnder fn #231

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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