RxGo icon indicating copy to clipboard operation
RxGo copied to clipboard

Add Support for Custom Error Assertion

Open edmondop opened this issue 10 months ago • 0 comments

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

edmondop avatar Apr 03 '24 19:04 edmondop