You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{-| A nice custom failure message for a failing expectation.Now if only there was a way to get rid of the "Given ..." :)-}customFailure:Expectation-> (String->String) ->ExpectationcustomFailure expectation failureString =case Test.Runner.getFailureReason expectation ofNothing->Expect.pass
Just{ description, reason }->Test.Runner.Failure.Extra.format description reason
|> failureString
|>Expect.fail
to use the nicely-formatted failure string, but wrap it in some explanations of its own.
This helper might be useful to others as well? Maybe it could live in this library, perhaps as mapFailureReason or something similar
ArchitectureTest has this helper:
to use the nicely-formatted failure string, but wrap it in some explanations of its own.
This helper might be useful to others as well? Maybe it could live in this library, perhaps as
mapFailureReason
or something similarThe text was updated successfully, but these errors were encountered: