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

Include generated input with each test.chuck checking block error #906

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zjroth
Copy link

@zjroth zjroth commented Dec 6, 2024

CIDER includes generated input in reports when the generated input is made available, which happens when using test.chuck and its checking block. Currently, generated input is made available only to the first test condition within a checking block. Unfortunately, this means that the generated input is not reported anywhere in CIDER unless the first test condition fails. As a result, the generated input is (in my experience) typically not reported in CIDER.

This PR addresses that issue by modifying the cider.nrepl.middleware.test/current-report atom selectively based on whether a test.chuck testing context is available, which results in the presence of a non-nil value in the :gen-input key of the report precisely when the report corresponds to an error generated in a checking block.

cc: @daemianmack

@alexander-yakushev
Copy link
Member

I don't think I ever used test.chuck (just the regular test.check). Could you please make a small reproducer to make it possible to validate the changes? A cider-nrepl test case would be nice too, but we can start with a reproducer and see if a proper test can be written.

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.

2 participants