@@ -277,8 +277,8 @@ describe('Angular with zoneless enabled', () => {
277
277
expect ( fixture . nativeElement . innerText ) . toEqual ( '' ) ;
278
278
} ) ;
279
279
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 ( ) ;
282
282
}
283
283
284
284
it (
@@ -316,14 +316,14 @@ describe('Angular with zoneless enabled', () => {
316
316
] ,
317
317
} ) ;
318
318
const appViewRef = ( applicationRef as any ) . _views [ 0 ] as { context : App ; rootNodes : any [ ] } ;
319
- await whenStable ( applicationRef ) ;
319
+ await applicationRef . whenStable ( ) ;
320
320
321
321
const component2 = createComponent ( DynamicCmp , {
322
322
environmentInjector : applicationRef . injector ,
323
323
} ) ;
324
324
appViewRef . context . viewContainer . insert ( component2 . hostView ) ;
325
325
expect ( isStable ( applicationRef . injector ) ) . toBe ( false ) ;
326
- await whenStable ( applicationRef ) ;
326
+ await applicationRef . whenStable ( ) ;
327
327
component2 . destroy ( ) ;
328
328
329
329
// destroying the view synchronously removes element from DOM when not using animations
@@ -333,7 +333,7 @@ describe('Angular with zoneless enabled', () => {
333
333
334
334
let checkCountBeforeStable = doCheckCount ;
335
335
let renderCountBeforeStable = renderHookCalls ;
336
- await whenStable ( applicationRef ) ;
336
+ await applicationRef . whenStable ( ) ;
337
337
// The view should not have refreshed
338
338
expect ( doCheckCount ) . toEqual ( checkCountBeforeStable ) ;
339
339
// but render hooks should have run
0 commit comments