-
Notifications
You must be signed in to change notification settings - Fork 25
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
Value diffs #154
Comments
This feature would be a real time and life saver 🙏 🙏 Currently at each failure we need to copy/past the two part and compare them in a diff tool. |
I agree something like this would be a nice addition to Unquote. I often run into the same issue, namely with equality comparison between two record types that contain many properties. I wonder if a first iteration that might go a long way would be to have a second reduction step after given
instead of failure output like
we could have something like
|
Guess starting from there and trying to see where the exact differences can be represented. Wondering if the issue is all about making a copycat of this particular Hedgehog feature (ie. colours and whatnot?) or nawt. |
Expecto went through this and eventually added an integration with DiffSharp, outsourcing the creation of the diff: https://github.com/haf/expecto/blob/master/Expecto.Diff/Library.fs |
Thanks, might worth looking at their impl. |
Someone (Urz Enzler) using Diffract to augment Unquote output (it's limited to quality expressions and coded specifically for Xunit assertions): https://www.planetgeek.ch/2023/02/20/todays-random-f-code-nice-test-error-messages-with-unquote-and-diffract/ |
This talk about Haskell's Hedgehog (only need to watch from that starting point for 30 seconds) mentions "value diffs". When some equality expression is false, instead of printing both sides separately, they are printed together except with diff notation to highlight the difference. Here is a screenshot from that talk.
I asked about if F# Hedgehog has this feature in hedgehogqa/fsharp-hedgehog#211, and it does not.
Does it make sense for Unquote to consider a feature like value diffs?
The text was updated successfully, but these errors were encountered: