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 respondsTo and satisfies as aliases #484

Merged
merged 1 commit into from
Jul 17, 2015
Merged

Conversation

couchand
Copy link
Contributor

This pull requests adds the assertion alias respondsTo for respondTo and satisfies for satisfy. This is to complete the API for subordinate clause grammar, such as:

expect(myObject).to.have.property('child').that.respondsTo('toString');
expect(myObject).to.have.property('child').that.satisfies(myPredicate);

When adding this I noticed one other place the API was incomplete: there is no exists property. This seems reasonable, though, since you can only get to a subordinate clause by previously asserting the existence of something.

Are there docs that I should update for this as well?

@keithamus
Copy link
Member

Thanks @couchand! You've already updating the docs, by virtue of adding the @alias directives in the docblocks!

keithamus added a commit that referenced this pull request Jul 17, 2015
Add respondsTo and satisfies as aliases
@keithamus keithamus merged commit 36873c6 into chaijs:master Jul 17, 2015
@couchand
Copy link
Contributor Author

🍻

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.

None yet

2 participants