Skip to content

Evaluate error message only after assertion failure in assertEqual #10

@klntsky

Description

@klntsky

Another thing that bothers me a little is that the full error message in assertEqual gets evaluated even if it is not needed. show can be quite expensive for large inputs.

Possible fix is to delay the first argument of assert' (some renaming should also be done to avoid breaking the API)

foreign import assert'
  :: (Unit -> String)
  -> Boolean
  -> Effect Unit

Should I make a PR for this issue, or is it too insignificant to care about?

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