Not check instaceOf if __proto__ is not supported

This commit is contained in:
Lucas Vieira 2016-09-19 15:26:35 -03:00
parent 7683356fff
commit d0242ee9e5

View file

@ -1026,7 +1026,11 @@ describe('utilities', function () {
// Ensure that foo returns an Assertion (not a function)
expect(expect('x').x()).to.be.an.instanceOf(assertionConstructor);
expect(expect('x').x).to.be.an.instanceOf(assertionConstructor);
var hasProtoSupport = '__proto__' in Object;
if (hasProtoSupport) {
expect(expect('x').x).to.be.an.instanceOf(assertionConstructor);
}
});
});