File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 14021402
14031403suite ( 'runtime effects' , function ( ) {
14041404
1405- var el ;
1405+ var el , el2 ;
14061406
14071407 setup ( function ( ) {
14081408 el = document . createElement ( 'x-basic' ) ;
14111411
14121412 teardown ( function ( ) {
14131413 document . body . removeChild ( el ) ;
1414+ document . body . removeChild ( el2 ) ;
14141415 } ) ;
14151416
14161417 test ( 'add/remove runtime property effect' , function ( ) {
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 ( ) {
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} ) ;
You can’t perform that action at this time.
0 commit comments