chaijs / chai-things

Chai support for assertions on array elements
http://chaijs.com/plugins/chai-things
Other
104 stars 14 forks source link

array.should.all.have.property('x').equal(5) not work #17

Closed joehua87 closed 9 years ago

joehua87 commented 9 years ago

Hello, I've try: [{a: 0}, {a: 0}].should.all.have.property('a').not.equal(0); => it's pass

[{a: 0}, {a: 0}].should.all.have.property('a').equal(0); => AssertionError: expected [ { a: 0 }, { a: 0 } ] to equal 0

I've seen the example on https://github.com/chaijs/Chai-Things/blob/master/test/all.coffee

Thank you,

keithamus commented 9 years ago

Hey @joehua87 thanks for the issue.

This is a duplicate issue of #7. The discussion there is a big more involved, so I'll close this one in favour of that. It's an outstanding issue, if you have any ideas on how to fix this, your input is welcome in #7.