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

Add to.have.properties expectation method #82

Closed
al6x opened this issue Jul 6, 2012 · 2 comments
Closed

Add to.have.properties expectation method #82

al6x opened this issue Jul 6, 2012 · 2 comments

Comments

@al6x
Copy link

al6x commented Jul 6, 2012

We currently have the expect(obj).to.have.property('key', 'value') expectation method, it would be nice to have ability to check for multiple properties at once.

Something like expect(obj).to.have.properties({key1: 'value1', key2: 'value2}), what do You think?

@logicalparadox
Copy link
Member

You should check out #72 for a discussion we had about this. Basically, there is too much ambiguity in implementing this is core: is this key:value matching or deep equality testing. Also, given that property is expected to change the topic the current assertion this would cause confusion in further chaining .

Your welcome to implement as a plugin. I suggest reading the docs about overwriteMethod on the guide here.

@al6x
Copy link
Author

al6x commented Jul 6, 2012

Duplicate of #72, closing.

@al6x al6x closed this as completed Jul 6, 2012
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

2 participants