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

Fix duplicate handling in members assertion #739

Merged
merged 1 commit into from
Jun 27, 2016

Conversation

meeber
Copy link
Contributor

@meeber meeber commented Jun 25, 2016

Prior to this PR, the behavior was for duplicates to be ignored when performing any kind of members assertion. This led to unexpected behavior when asserting for sameness, as exemplified in #590. We consider this to be a bug.

With this PR, duplicates are no longer ignored when asserting for sameness, but are still ignored when asserting for inclusion. Bug fixed!

An argument could be made that duplicates should never be ignored, even for inclusion assertions. But that's a breaking change instead of a bug fix. Therefore, that debate will be left for another day. It'd be easy to make that change in the future if agreed upon.

@lucasfcosta
Copy link
Member

Nice job!
LGTM.

@keithamus
Copy link
Member

Awesome work @meeber. LGTM 👍

@keithamus keithamus merged commit cc7799c into chaijs:master Jun 27, 2016
@meeber meeber deleted the duplicate-members branch August 6, 2017 13:47
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.

Handling of duplicates when comparing sets
3 participants