chaijs / deep-eql

Improved deep equality testing for Node.js and the browser.
MIT License
108 stars 39 forks source link

Assertion error does not state problematic parts for Maps #61

Open el opened 6 years ago

el commented 6 years ago
chai.expect(new Map([['a','a']])).to.deep.equal(new Map([['a','b']]))
// AssertionError: expected {} to deeply equal {}
chai.expect([['a','a']]).to.deep.equal([['a','b']])
// AssertionError: expected [ [ 'a', 'a' ] ] to deeply equal [ [ 'a', 'b' ] ]

As you can se it is not clear why it fails from the error message

pcorpet commented 5 years ago

I believe this is not a deep-eql issue, but rather a display issue in chai itself. https://github.com/chaijs/chai/issues/1228