Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow predicates to return failure messages #4

Open
ezoerner opened this issue Jun 22, 2022 · 1 comment
Open

Allow predicates to return failure messages #4

ezoerner opened this issue Jun 22, 2022 · 1 comment

Comments

@ezoerner
Copy link

When a test fails, the error message includes the data for the input parameters, which is good, but it doesn't show any information about why the predicate failed. Currently the predicate set in suchThat is just a boolean so has no way of contributing text to the error message if it fails. Instead of returning a boolean it could return a value that can be queried for a message in the event of failure.

@ezoerner
Copy link
Author

A workaround for this would be for the test predicate to just log a failure message to stdout

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

No branches or pull requests

1 participant