-
Notifications
You must be signed in to change notification settings - Fork 107
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
Show less context on failure #505
Conversation
0f8a9af
to
895d1de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, and we could include it in the upcoming hedgehog 1.5 release 👍 🚀
I know it's a bit much to ask, but in respecting Jacob's memory, who was always using let
instead of where
, could we align with our style guidelines and make this adjustment? It’s a small tribute to his preferences and helps keep hedgehog codebase consistent too.
If you're not inclined to make this change, that's totally fine—I can take care of it before merging.
Thanks for your contribution, @sol!
@moodmosaic thanks a lot for taking a look at this.
That makes sense, yes 👍
If it's not too much trouble for you then that would be great. |
I'm looking into it right now. |
@moodmosaic done! Anything else you need? Changes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@sol, thank you 👍 In order to continue with hspec/hspec-hedgehog#35 do we want a new release on hackage? |
I'm gone use the git version for the time being. But once we have a release, all users will benefit from it, which I think will be a big improvement. |
Of course 👍 Let’s plan for a release in May. |
Currently
hedgehog
error output is literally useless when used withhspec-hedgehog
.hedgehog
includes the whole top-level definition in which the error occurred in the error output. Hspec test suites tend to define all tests in one top level definition. As a result,hspec-hedgehog
will include the whole test suite in the error output for each failing test.This produces lots of boring output with only little interesting output in between.
This PR allows the user to specify an upper limit of boring output lines that are printed around interesting output lines. This can be used by
hspec-hedgehog
to provide more useful error output.hspec/hspec-hedgehog#35