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

Empty object is eql to empty array #156

Closed
rejeep opened this issue Apr 25, 2013 · 3 comments
Closed

Empty object is eql to empty array #156

rejeep opened this issue Apr 25, 2013 · 3 comments
Assignees
Milestone

Comments

@rejeep
Copy link

rejeep commented Apr 25, 2013

Both these expressions pass, which is very confusing. Should they?

[].should.eql({})
{}.should.eql([])
@bradcavanagh
Copy link

Similarly, this passes:

expect(true).to.eql({})

I wasn't really expecting this, and it's really throwing off one of the tests I have to put in to test a bug has been fixed (my code's erroneously returning 'true' when it should be returning an empty object).

@moll
Copy link

moll commented Jun 8, 2013

It's insane this is not fixed yesterday. Such a blatant false positive for an assertion framework.

@logicalparadox
Copy link
Member

Will be fixed with #194

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

4 participants