test: make sure that useProxy config is checked in overwriteProperty

This commit is contained in:
Lucas Vieira 2019-05-28 13:50:14 -03:00
parent 18d84948f4
commit 42509fac01

View file

@ -596,6 +596,15 @@ describe('utilities', function () {
expect(expect([1, 2, 3]).foo).to.be.an.instanceOf(assertionConstructor);
});
describe('when useProxy is false', function () {
before(function () {
chai.config.useProxy = false;
});
after(function () {
chai.config.useProxy = true;
});
it('overwriteProperty sets `ssfi` when `lockSsfi` isn\'t set', function () {
var origAssertion = expect(4);
var origSsfi = utils.flag(origAssertion, 'ssfi');
@ -605,6 +614,7 @@ describe('utilities', function () {
expect(origSsfi).to.not.equal(newSsfi);
});
});
it('overwriteProperty doesn\'t set `ssfi` when `lockSsfi` is set', function () {
var origAssertion = expect(4);