vbardales / chai-properties

Properties matcher for chai that assert values have all the same attributes and values without asserting strict object equality.
16 stars 9 forks source link

Accept an array of strings to describe properties for simple flat objects #14

Closed Turkish closed 7 years ago

Turkish commented 7 years ago

let obj = {a: 'value one', b: 'value2'}
expect(obj).to.have.properties(['a','b'])
Turkish commented 7 years ago

Not an issue as we can use :

expect(obj).to.have.all.keys('a','b')

And chai-properties is intended to test not only existence of properties but their values too