Skip to content

Conversation

@LaurenceWarne
Copy link

Hi, I've found that a utility that accomplishes what matches does, but returns the match instead of an Expectation is helpful sometimes, avoiding situations like:

for {
  _ <- expect.eql(myVar, someForm).failFast
  myVarInForm <- unsafeGet(myVar)
 // Further logic + assertions ...
} yield ()

The idea is the above can be replaced by matchOrFailFast which performs both steps at the same time.

I wasn't really sure the best place to put tests, but LMK what you think about that and the feature.

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant