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

Support for seeing diff between expected and tested #51

Open
pallix opened this issue May 9, 2017 · 7 comments
Open

Support for seeing diff between expected and tested #51

pallix opened this issue May 9, 2017 · 7 comments

Comments

@pallix
Copy link

pallix commented May 9, 2017

Hello,

Thanks for writing this library, it is very useful.
It would be very cool if it would be possible to get a diff between expected and tested values, like in PyTest (see the "Making use of context-sensitive comparisons" section)

@felixSchl
Copy link
Collaborator

I think this is something that could be implemented independent of purescript-spec, similar to how you would use chai with mocha.

@hdgarrood
Copy link

shameless plug for https://github.com/hdgarrood/purescript-debugged

@owickstrom
Copy link
Collaborator

Maybe a separate library with purescript-spec assertions based on purescript-debugged could be nice, if one wanted to build such a thing? 🙂

@JordanMartinez
Copy link
Contributor

Most likely. At the recent BeachHac conference, someone was mentioning their take on a diffing type class: https://www.youtube.com/watch?v=1dTvSxPN7hQ&list=PLO46zvIozaIpZBhU85uvJXPg0PMmU-2ZY&index=1

@csicar
Copy link

csicar commented Aug 20, 2020

I've been using elm-test recently and found the basic diffing on Show is already very useful.

If there's interest in having this as part of this library, I would like to give implementing it a try.

@owickstrom
Copy link
Collaborator

owickstrom commented Jan 1, 2021

@csicar I don't have any strong opinions on the technique itself, only that it should probably be its own library if that works. Essentially providing an alternative to shouldEqual.

@flip111
Copy link

flip111 commented Dec 24, 2023

would be a cool feature. Does anyone know some algorithms for this? Perhaps already implemented in another language?

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

7 participants