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 size matcher #22

Closed
wants to merge 1 commit into from
Closed

Add size matcher #22

wants to merge 1 commit into from

Conversation

RStankov
Copy link

@RStankov RStankov commented Nov 7, 2012

I needed a method to check if jquery object contains an exact number of elements.

@jfirebaugh
Copy link
Member

Hmm... this would be one solution for #21. But size() is a deprecated jQuery API.

@RStankov
Copy link
Author

RStankov commented Nov 8, 2012

I didn't know it was deprecated. But I still think that the matcher is need, so I just changed the implementation.

@jfirebaugh
Copy link
Member

The chai API tries to stick very closely to the jQuery API, and I'm reluctant to mirror a deprecated API. I think I'd prefer to keep the current API and adopt the expect(selection).to.be.of.length(2) as the officially sanctioned workaround. I'll note that in the README. Sorry for leaving this in limbo for so long.

@jfirebaugh jfirebaugh closed this Dec 27, 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

Successfully merging this pull request may close these issues.

None yet

2 participants