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

have.property(key, value) asserts "==="-equality #124

Open
rauno56 opened this issue Nov 17, 2014 · 2 comments
Open

have.property(key, value) asserts "==="-equality #124

rauno56 opened this issue Nov 17, 2014 · 2 comments

Comments

@rauno56
Copy link
Contributor

rauno56 commented Nov 17, 2014

I personally expected

expect(object).to.have.property(key, value);

to behave just like

expect(object).to.have.property(key);
expect(object[key]).to.eql(value);

but it does ".equal(value)" instead. Which one is the right behaviour?

@nathanmacinnes
Copy link
Contributor

My expectation is the current behaviour, but I can see an argument for either. I have submitted pull request #123 which allows syntax like this:

expect(object).to.have.property(key).which.eql(value);

But I think the original author has ceased development on this project. I'm considering my own fork.

rauno56 added a commit to rauno56/expect.js that referenced this issue Nov 17, 2014
@rauno56
Copy link
Contributor Author

rauno56 commented Nov 17, 2014

Cool. I quess you are right. Thank you.

I just now discovered how stale the repo really is. Well, I already did the PR so... whatever, @guille.

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 a pull request may close this issue.

2 participants