-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support for 'change X from A to B' #127
Comments
Hey there! Glad this gem is helping you, and thanks for the suggestion. You mention that you want the diff to show up if the start or end of the value in question is different, but I'm curious whether it would be more helpful to people (and less surprising) if the logic were more general — display the diff of the "before" and "after" versions if they don't match at all? For instance, what if the two arrays are technically the same at the start or end but different in the middle:
Or what if one or both of the values aren't arrays at all:
It seems like it might still be helpful to show the diff in those cases. What do you think? |
Yep that works for me. Also, its good to see a fellow commander keen fan in the wild |
@jesseduffield Haha, thanks! Many people don't recognize it so it's cool you noticed. If you want to dive into working on a fix for this, then that would be neat! If you want to understand how the gem is structured, I have a visual and some quick explanations of concepts here. That said, I know the documentation is lacking, so here are some pointers:
I imagine you will probably need some help as I know not everything is super obvious, so don't hesitate to ask (either here or in a new draft PR). |
First off, thanks for this project, it's been a great help to me :)
I was wondering if we could add support for when we assert both on the start and end value of an object. This is the norm at my workplace because it ensures that the end value isn't coincidentally the start value due to let bindings being shuffled around. E.g:
yields:
but
yields:
Ideally this would show a diff of the difference if either the start value or end value don't match up with the actual value when checked.
If this is something I can help contribute to, let me know :)
The text was updated successfully, but these errors were encountered: