@@ -995,17 +995,18 @@ function declareTests(config?: {useJit: boolean}) {
995
995
expect ( dir . receivedArgs ) . toEqual ( [ 'one' , undefined ] ) ;
996
996
} ) ;
997
997
998
- fixmeIvy ( 'unknown' ) && it ( 'should not allow pipes in hostListeners' , ( ) => {
999
- @Directive ( { selector : '[host-listener]' , host : { '(click)' : 'doIt() | somePipe' } } )
1000
- class DirectiveWithHostListener {
1001
- }
998
+ fixmeIvy ( 'FW-742: Pipes in host listeners should throw a descriptive error' ) &&
999
+ it ( 'should not allow pipes in hostListeners' , ( ) => {
1000
+ @Directive ( { selector : '[host-listener]' , host : { '(click)' : 'doIt() | somePipe' } } )
1001
+ class DirectiveWithHostListener {
1002
+ }
1002
1003
1003
- TestBed . configureTestingModule ( { declarations : [ MyComp , DirectiveWithHostListener ] } ) ;
1004
- const template = '<div host-listener></div>' ;
1005
- TestBed . overrideComponent ( MyComp , { set : { template} } ) ;
1006
- expect ( ( ) => TestBed . createComponent ( MyComp ) )
1007
- . toThrowError ( / C a n n o t h a v e a p i p e i n a n a c t i o n e x p r e s s i o n / ) ;
1008
- } ) ;
1004
+ TestBed . configureTestingModule ( { declarations : [ MyComp , DirectiveWithHostListener ] } ) ;
1005
+ const template = '<div host-listener></div>' ;
1006
+ TestBed . overrideComponent ( MyComp , { set : { template} } ) ;
1007
+ expect ( ( ) => TestBed . createComponent ( MyComp ) )
1008
+ . toThrowError ( / C a n n o t h a v e a p i p e i n a n a c t i o n e x p r e s s i o n / ) ;
1009
+ } ) ;
1009
1010
1010
1011
1011
1012
@@ -1238,37 +1239,35 @@ function declareTests(config?: {useJit: boolean}) {
1238
1239
} ) ;
1239
1240
1240
1241
describe ( '.insert' , ( ) => {
1241
- fixmeIvy ( 'unknown' ) &&
1242
- it ( 'should throw with destroyed views' , async ( ( ) => {
1243
- const fixture = TestBed . configureTestingModule ( { schemas : [ NO_ERRORS_SCHEMA ] } )
1244
- . createComponent ( MyComp ) ;
1245
- const tc = fixture . debugElement . children [ 0 ] . children [ 0 ] ;
1246
- const dynamicVp : DynamicViewport = tc . injector . get ( DynamicViewport ) ;
1247
- const ref = dynamicVp . create ( ) ;
1248
- fixture . detectChanges ( ) ;
1242
+ it ( 'should throw with destroyed views' , async ( ( ) => {
1243
+ const fixture = TestBed . configureTestingModule ( { schemas : [ NO_ERRORS_SCHEMA ] } )
1244
+ . createComponent ( MyComp ) ;
1245
+ const tc = fixture . debugElement . children [ 0 ] . children [ 0 ] ;
1246
+ const dynamicVp : DynamicViewport = tc . injector . get ( DynamicViewport ) ;
1247
+ const ref = dynamicVp . create ( ) ;
1248
+ fixture . detectChanges ( ) ;
1249
1249
1250
- ref . destroy ( ) ;
1251
- expect ( ( ) => {
1252
- dynamicVp . insert ( ref . hostView ) ;
1253
- } ) . toThrowError ( 'Cannot insert a destroyed View in a ViewContainer!' ) ;
1254
- } ) ) ;
1250
+ ref . destroy ( ) ;
1251
+ expect ( ( ) => {
1252
+ dynamicVp . insert ( ref . hostView ) ;
1253
+ } ) . toThrowError ( 'Cannot insert a destroyed View in a ViewContainer!' ) ;
1254
+ } ) ) ;
1255
1255
} ) ;
1256
1256
1257
1257
describe ( '.move' , ( ) => {
1258
- fixmeIvy ( 'unknown' ) &&
1259
- it ( 'should throw with destroyed views' , async ( ( ) => {
1260
- const fixture = TestBed . configureTestingModule ( { schemas : [ NO_ERRORS_SCHEMA ] } )
1261
- . createComponent ( MyComp ) ;
1262
- const tc = fixture . debugElement . children [ 0 ] . children [ 0 ] ;
1263
- const dynamicVp : DynamicViewport = tc . injector . get ( DynamicViewport ) ;
1264
- const ref = dynamicVp . create ( ) ;
1265
- fixture . detectChanges ( ) ;
1258
+ it ( 'should throw with destroyed views' , async ( ( ) => {
1259
+ const fixture = TestBed . configureTestingModule ( { schemas : [ NO_ERRORS_SCHEMA ] } )
1260
+ . createComponent ( MyComp ) ;
1261
+ const tc = fixture . debugElement . children [ 0 ] . children [ 0 ] ;
1262
+ const dynamicVp : DynamicViewport = tc . injector . get ( DynamicViewport ) ;
1263
+ const ref = dynamicVp . create ( ) ;
1264
+ fixture . detectChanges ( ) ;
1266
1265
1267
- ref . destroy ( ) ;
1268
- expect ( ( ) => {
1269
- dynamicVp . move ( ref . hostView , 1 ) ;
1270
- } ) . toThrowError ( 'Cannot move a destroyed View in a ViewContainer!' ) ;
1271
- } ) ) ;
1266
+ ref . destroy ( ) ;
1267
+ expect ( ( ) => {
1268
+ dynamicVp . move ( ref . hostView , 1 ) ;
1269
+ } ) . toThrowError ( 'Cannot move a destroyed View in a ViewContainer!' ) ;
1270
+ } ) ) ;
1272
1271
} ) ;
1273
1272
1274
1273
} ) ;
0 commit comments