@@ -277,8 +277,8 @@ describe('Angular with zoneless enabled', () => {
277277 expect ( fixture . nativeElement . innerText ) . toEqual ( '' ) ;
278278 } ) ;
279279
280- function whenStable ( applicationRef = TestBed . inject ( ApplicationRef ) ) : Promise < boolean > {
281- return firstValueFrom ( applicationRef . isStable . pipe ( filter ( ( stable ) => stable ) ) ) ;
280+ function whenStable ( ) : Promise < void > {
281+ return TestBed . inject ( ApplicationRef ) . whenStable ( ) ;
282282 }
283283
284284 it (
@@ -316,14 +316,14 @@ describe('Angular with zoneless enabled', () => {
316316 ] ,
317317 } ) ;
318318 const appViewRef = ( applicationRef as any ) . _views [ 0 ] as { context : App ; rootNodes : any [ ] } ;
319- await whenStable ( applicationRef ) ;
319+ await applicationRef . whenStable ( ) ;
320320
321321 const component2 = createComponent ( DynamicCmp , {
322322 environmentInjector : applicationRef . injector ,
323323 } ) ;
324324 appViewRef . context . viewContainer . insert ( component2 . hostView ) ;
325325 expect ( isStable ( applicationRef . injector ) ) . toBe ( false ) ;
326- await whenStable ( applicationRef ) ;
326+ await applicationRef . whenStable ( ) ;
327327 component2 . destroy ( ) ;
328328
329329 // destroying the view synchronously removes element from DOM when not using animations
@@ -333,7 +333,7 @@ describe('Angular with zoneless enabled', () => {
333333
334334 let checkCountBeforeStable = doCheckCount ;
335335 let renderCountBeforeStable = renderHookCalls ;
336- await whenStable ( applicationRef ) ;
336+ await applicationRef . whenStable ( ) ;
337337 // The view should not have refreshed
338338 expect ( doCheckCount ) . toEqual ( checkCountBeforeStable ) ;
339339 // but render hooks should have run
0 commit comments