debitoor / chai-subset

"containSubset" object properties matcher for Chai
http://chaijs.com/plugins/chai-subset/
MIT License
82 stars 20 forks source link

Fail if the actual array has items but the expected is empty #20

Closed taromero closed 8 years ago

taromero commented 8 years ago

Not ready to merge yet, as this makes the circular object test to fail.

it('should fail if expected is filled but actual is empty', function () {
   expect({ anArray: ['1'] }).to.not.containSubset({ anArray: [] });
})

The above (new) test was failing, so I tried to fix it (assuming it's a bug).

This makes the circular object test to fail. Before trying to fix that I'd like to know if this logic is ok, and any comments you might have regarding the circular object test failing (maybe it can be written on a different way, or maybe this new logic I'm trying to add is just wrong).

taromero commented 8 years ago

Closing since the feature was not approved on #19.