diff --git a/test/unit/property-effects.html b/test/unit/property-effects.html
index c9c3c1355a..c1be29da2d 100644
--- a/test/unit/property-effects.html
+++ b/test/unit/property-effects.html
@@ -1621,27 +1621,33 @@
this.observer = sinon.spy();
}
}
- TestClass.createMethodObserver('observer(a, b.c)');
+ TestClass.createMethodObserver('observer(a, b.c)', true);
customElements.define('pe-method-observer', TestClass);
let el = document.createElement('pe-method-observer');
document.body.appendChild(el);
- assert.equal(el.observer.callCount, 0);
- assert.equal(el.pcSpy.callCount, 0);
- el.a = 'a';
assert.equal(el.observer.callCount, 1);
- assert.deepEqual(el.observer.getCall(0).args, ['a', undefined]);
+ assert.deepEqual(el.observer.getCall(0).args, [undefined, undefined]);
assert.equal(el.pcSpy.callCount, 1);
- el.b = {c: 'c'};
+ el.a = 'a';
assert.equal(el.observer.callCount, 2);
- assert.deepEqual(el.observer.getCall(1).args, ['a', 'c']);
+ assert.deepEqual(el.observer.getCall(1).args, ['a', undefined]);
assert.equal(el.pcSpy.callCount, 2);
+ el.b = {c: 'c'};
+ assert.equal(el.observer.callCount, 3);
+ assert.deepEqual(el.observer.getCall(2).args, ['a', 'c']);
+ assert.equal(el.pcSpy.callCount, 3);
el.setProperties({
a: 'A',
b: {c: 'C'}
})
- assert.equal(el.observer.callCount, 3);
- assert.deepEqual(el.observer.getCall(2).args, ['A', 'C']);
- assert.equal(el.pcSpy.callCount, 3);
+ assert.equal(el.observer.callCount, 4);
+ assert.deepEqual(el.observer.getCall(3).args, ['A', 'C']);
+ assert.equal(el.pcSpy.callCount, 4);
+
+ el.observer = sinon.spy();
+ assert.equal(el.observer.callCount, 1);
+ assert.deepEqual(el.observer.getCall(0).args, ['A', 'C']);
+ assert.equal(el.pcSpy.callCount, 5);
document.body.removeChild(el);
});