@@ -491,42 +491,6 @@ export function main() {
491491
492492 expect ( renderLog . log ) . toEqual ( [ 'someProp=Megatron' ] ) ;
493493 } ) ) ;
494-
495- it ( 'should call pure pipes only if the arguments change' , fakeAsync ( ( ) => {
496- var ctx = _bindSimpleValue ( 'name | countingPipe' , Person ) ;
497- // change from undefined -> null
498- ctx . componentInstance . name = null ;
499- ctx . detectChanges ( false ) ;
500- expect ( renderLog . loggedValues ) . toEqual ( [ 'null state:0' ] ) ;
501- ctx . detectChanges ( false ) ;
502- expect ( renderLog . loggedValues ) . toEqual ( [ 'null state:0' ] ) ;
503-
504- // change from null -> some value
505- ctx . componentInstance . name = 'bob' ;
506- ctx . detectChanges ( false ) ;
507- expect ( renderLog . loggedValues ) . toEqual ( [ 'null state:0' , 'bob state:1' ] ) ;
508- ctx . detectChanges ( false ) ;
509- expect ( renderLog . loggedValues ) . toEqual ( [ 'null state:0' , 'bob state:1' ] ) ;
510-
511- // change from some value -> some other value
512- ctx . componentInstance . name = 'bart' ;
513- ctx . detectChanges ( false ) ;
514- expect ( renderLog . loggedValues )
515- . toEqual ( [ 'null state:0' , 'bob state:1' , 'bart state:2' ] ) ;
516- ctx . detectChanges ( false ) ;
517- expect ( renderLog . loggedValues )
518- . toEqual ( [ 'null state:0' , 'bob state:1' , 'bart state:2' ] ) ;
519-
520- } ) ) ;
521-
522- it ( 'should call impure pipes on each change detection run' , fakeAsync ( ( ) => {
523- var ctx = _bindSimpleValue ( 'name | countingImpurePipe' , Person ) ;
524- ctx . componentInstance . name = 'bob' ;
525- ctx . detectChanges ( false ) ;
526- expect ( renderLog . loggedValues ) . toEqual ( [ 'bob state:0' ] ) ;
527- ctx . detectChanges ( false ) ;
528- expect ( renderLog . loggedValues ) . toEqual ( [ 'bob state:0' , 'bob state:1' ] ) ;
529- } ) ) ;
530494 } ) ;
531495
532496 describe ( 'event expressions' , ( ) => {
@@ -1050,7 +1014,6 @@ const ALL_DIRECTIVES = CONST_EXPR([
10501014
10511015const ALL_PIPES = CONST_EXPR ( [
10521016 forwardRef ( ( ) => CountingPipe ) ,
1053- forwardRef ( ( ) => CountingImpurePipe ) ,
10541017 forwardRef ( ( ) => MultiArgPipe ) ,
10551018 forwardRef ( ( ) => PipeWithOnDestroy ) ,
10561019 forwardRef ( ( ) => IdentityPipe ) ,
@@ -1126,12 +1089,6 @@ class CountingPipe implements PipeTransform {
11261089 transform ( value , args = null ) { return `${ value } state:${ this . state ++ } ` ; }
11271090}
11281091
1129- @Pipe ( { name : 'countingImpurePipe' , pure : false } )
1130- class CountingImpurePipe implements PipeTransform {
1131- state : number = 0 ;
1132- transform ( value , args = null ) { return `${ value } state:${ this . state ++ } ` ; }
1133- }
1134-
11351092@Pipe ( { name : 'pipeWithOnDestroy' } )
11361093class PipeWithOnDestroy implements PipeTransform , OnDestroy {
11371094 constructor ( private directiveLog : DirectiveLog ) { }
0 commit comments