Skip to content

Conversation

edmondop
Copy link

@edmondop edmondop commented Apr 3, 2024

Today the package provides Assertion helpers for errors of three type:

  • assert the observable has an error (any error)
  • assert the observable has one error
  • assert the observable has several specific errors

These assertions are useful, but could be either too broad or too narrow. Having an assertion that is very precise on the error (that returns true to a fully equality comparison) makes tests brittle, having an assertion that matches any error makes it difficult to know that the failure is right one

This PR adds an additional way to match errors through the introduction of ErrorPredicate

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