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

Is it possible to log some contextual information when an assertion fails? #29

Open
marke-apexit opened this issue Dec 2, 2022 · 1 comment

Comments

@marke-apexit
Copy link

marke-apexit commented Dec 2, 2022

Is it possible to log some contextual information to the console, or a log, when an assertion fails?

If so, how would I do that? If not, I think it would be a useful feature.

@marke-apexit marke-apexit changed the title How can I log additional information when an assertion fails? Is it possible to log some contextual information when an assertion fails? Dec 3, 2022
@marke-apexit
Copy link
Author

marke-apexit commented Dec 3, 2022

I discovered that is what the message parameter is on the assertion tests.

However, it would be nice if the assertion could take a callback function parameter so it would be possible to execute code that could do custom logging.

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