Skip to content

Commit bf2dbe0

Browse files
committed
Ensure prototype wasn't affected by runtime effects.
1 parent 1471106 commit bf2dbe0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

test/unit/property-effects.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@
14021402

14031403
suite('runtime effects', function() {
14041404

1405-
var el;
1405+
var el, el2;
14061406

14071407
setup(function() {
14081408
el = document.createElement('x-basic');
@@ -1411,6 +1411,7 @@
14111411

14121412
teardown(function() {
14131413
document.body.removeChild(el);
1414+
document.body.removeChild(el2);
14141415
});
14151416

14161417
test('add/remove runtime property effect', function() {
@@ -1429,6 +1430,10 @@
14291430
el._removePropertyEffect('value', el.PROPERTY_EFFECT_TYPES.OBSERVE, effect);
14301431
el.value = 'value+++';
14311432
assert.equal(fn.callCount, 1);
1433+
// Ensure prototype wasn't affected
1434+
el2 = document.createElement('x-basic');
1435+
document.body.appendChild(el2);
1436+
assert.equal(fn.callCount, 1);
14321437
});
14331438

14341439
test('add/remove runtime path effect', function() {
@@ -1455,6 +1460,10 @@
14551460
el._removePropertyEffect('value', el.PROPERTY_EFFECT_TYPES.OBSERVE, effect);
14561461
el.set('value.path', 'value.path+++');
14571462
assert.equal(fn.callCount, 2);
1463+
// Ensure prototype wasn't affected
1464+
el2 = document.createElement('x-basic');
1465+
document.body.appendChild(el2);
1466+
assert.equal(fn.callCount, 2);
14581467
});
14591468

14601469
});

0 commit comments

Comments
 (0)