Chai deep contains assertion on nested objects
问题 I'm trying to assert that a object contains another one(e.i. deep equal cannot be use), but it seems that the nested ones are checked strictly. Code example: describe('Meta', function () { it('object should contains a cloned copy', function () { var obj = {a: 1, b: '2', c: {a: 2, b: '2'}}; return expect(obj).deep.contains(JSON.parse(JSON.stringify(obj))); }); }); Error message: AssertionError: expected { a: 1, b: '2', c: { a: 2, b: '2' } } to have a property 'c' of { a: 2, b: '2' }, but got {