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

Provide a non-strict property check #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

smlgbl
Copy link

@smlgbl smlgbl commented Jul 8, 2014

Sometimes I want to compare properties in a non-strict way, but would like to keep the notation.
Besides, I'd like to see the actual value of the property right away, hence the change in output for an AssertionError.

smlgbl and others added 6 commits July 8, 2014 11:05
When comparing big objects, it's hard to spot the actual property to see exactly where the difference is. There's probably a better way of printing the object, but this is a little workaround.
@moll
Copy link
Owner

moll commented Sep 22, 2015

Hey, Samuel! Thanks for the PR! I think I set my time machine in the wrong direction and missed one year. :D Seems this is a related to #21. One idea I've had was to shorten the names of strict functions to have them use the eql logic internally. property would be prop, include as incl et. al. On the negative side, you can't really tell how property and prop differ by their name. Boolean flags happen to have the same problem.

What's your stance these days?

@smlgbl
Copy link
Author

smlgbl commented Sep 23, 2015

Hi Andri,

in general I try to avoid naming discussions, but I like your idea with the shorter names as in === vs ==.
To clarify for people not into the brevity thing, just alias them with strictEqual vs. nonStrictEqual. In my opinion they can and should all be recursive.

@smlgbl
Copy link
Author

smlgbl commented Aug 14, 2020

Too old now. Cleanup.

@smlgbl smlgbl closed this Aug 14, 2020
@moll
Copy link
Owner

moll commented Aug 14, 2020

Hey! I think your contribution is still worth looking at and I expect to do so. Thank you again! I'll keep this open, if you don't mind, as a reminder to do so when I eventually stop procrastinating. 😇

@moll moll reopened this Aug 14, 2020
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