@@ -456,7 +456,7 @@ describe('getInjectorMetadata', () => {
456456 } ) ;
457457 afterEach ( ( ) => setInjectorProfiler ( null ) ) ;
458458
459- it ( 'should be able to determine injector type and name' , fakeAsync ( ( ) => {
459+ it ( 'should be able to determine injector type and name' , async ( ) => {
460460 class MyServiceA { }
461461 @NgModule ( { providers : [ MyServiceA ] } )
462462 class ModuleA { }
@@ -500,8 +500,7 @@ describe('getInjectorMetadata', () => {
500500 } ) ;
501501
502502 const root = TestBed . createComponent ( MyStandaloneComponent ) ;
503- TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
504- tick ( ) ;
503+ await TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
505504 root . detectChanges ( ) ;
506505
507506 function afterLazyComponentRendered ( lazyComponent : LazyComponent ) {
@@ -537,7 +536,7 @@ describe('getInjectorMetadata', () => {
537536 expect ( injectorMetadata [ 4 ] ! . type ) . toBe ( 'environment' ) ;
538537 expect ( injectorMetadata [ 5 ] ! . type ) . toBe ( 'environment' ) ;
539538 }
540- } ) ) ;
539+ } ) ;
541540
542541 it ( 'should return null for injectors it does not recognize' , ( ) => {
543542 class MockInjector extends Injector {
@@ -814,7 +813,7 @@ describe('getInjectorProviders', () => {
814813 expect ( myServiceBProvider ! . importPath ! [ 2 ] ) . toBe ( ModuleC ) ;
815814 } ) ;
816815
817- it ( 'should be able to determine import paths after module provider flattening in the standalone component case with lazy components' , fakeAsync ( ( ) => {
816+ it ( 'should be able to determine import paths after module provider flattening in the standalone component case with lazy components' , async ( ) => {
818817 class MyService { }
819818
820819 @NgModule ( { providers : [ MyService ] } )
@@ -850,8 +849,7 @@ describe('getInjectorProviders', () => {
850849 ] ,
851850 } ) ;
852851 const root = TestBed . createComponent ( MyStandaloneComponent ) ;
853- TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
854- tick ( ) ;
852+ await TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
855853 root . detectChanges ( ) ;
856854
857855 const myStandaloneComponentNodeInjector = root . componentRef . injector ;
@@ -883,9 +881,9 @@ describe('getInjectorProviders', () => {
883881 expect ( myServiceProviderRecord ! . importPath ! . length ) . toBe ( 2 ) ;
884882 expect ( myServiceProviderRecord ! . importPath ! [ 0 ] ) . toBe ( MyStandaloneComponentB ) ;
885883 expect ( myServiceProviderRecord ! . importPath ! [ 1 ] ) . toBe ( ModuleA ) ;
886- } ) ) ;
884+ } ) ;
887885
888- it ( 'should be able to determine providers in a lazy route that has providers' , fakeAsync ( ( ) => {
886+ it ( 'should be able to determine providers in a lazy route that has providers' , async ( ) => {
889887 class MyService { }
890888
891889 @Component ( { selector : 'my-comp-b' , template : 'hello world' } )
@@ -915,8 +913,7 @@ describe('getInjectorProviders', () => {
915913 ] ,
916914 } ) ;
917915 const root = TestBed . createComponent ( MyStandaloneComponent ) ;
918- TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
919- tick ( ) ;
916+ await TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
920917 root . detectChanges ( ) ;
921918
922919 const myStandalonecomponentB = root . componentRef . instance ! . routerOutlet !
@@ -935,7 +932,7 @@ describe('getInjectorProviders', () => {
935932 expect ( myServiceProviderRecord ) . toBeTruthy ( ) ;
936933 expect ( myServiceProviderRecord ! . provider ) . toBe ( MyService ) ;
937934 expect ( myServiceProviderRecord ! . token ) . toBe ( MyService ) ;
938- } ) ) ;
935+ } ) ;
939936
940937 it ( 'should be able to determine providers in an injector that was created manually' , fakeAsync ( ( ) => {
941938 class MyService { }
@@ -1034,7 +1031,7 @@ describe('getDependenciesFromInjectable', () => {
10341031 } ) ;
10351032 afterEach ( ( ) => setInjectorProfiler ( null ) ) ;
10361033
1037- it ( 'should be able to determine which injector dependencies come from' , fakeAsync ( ( ) => {
1034+ it ( 'should be able to determine which injector dependencies come from' , async ( ) => {
10381035 class MyService { }
10391036 class MyServiceB { }
10401037 class MyServiceC { }
@@ -1109,8 +1106,7 @@ describe('getDependenciesFromInjectable', () => {
11091106 } ) ;
11101107
11111108 const root = TestBed . createComponent ( MyStandaloneComponent ) ;
1112- TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
1113- tick ( ) ;
1109+ await TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
11141110 root . detectChanges ( ) ;
11151111
11161112 const myStandalonecomponentB = root . componentRef . instance ! . routerOutlet !
@@ -1232,9 +1228,9 @@ describe('getDependenciesFromInjectable', () => {
12321228 // The NodeInjector that provides MyService is not in the host path of this injector.
12331229 expect ( deps ! . dependencies [ 0 ] . providedIn ) . toBeUndefined ( ) ;
12341230 }
1235- } ) ) ;
1231+ } ) ;
12361232
1237- it ( 'should be able to recursively determine dependencies of dependencies by using the providedIn field' , fakeAsync ( ( ) => {
1233+ it ( 'should be able to recursively determine dependencies of dependencies by using the providedIn field' , async ( ) => {
12381234 @Injectable ( )
12391235 class MyService {
12401236 myServiceB = inject ( MyServiceB ) ;
@@ -1318,7 +1314,7 @@ describe('getDependenciesFromInjectable', () => {
13181314 host : false ,
13191315 } ) ;
13201316 expect ( routerDependency . providedIn ) . toBe ( ( standaloneInjector as R3Injector ) . parent ) ;
1321- } ) ) ;
1317+ } ) ;
13221318} ) ;
13231319
13241320describe ( 'getInjectorResolutionPath' , ( ) => {
@@ -1328,7 +1324,7 @@ describe('getInjectorResolutionPath', () => {
13281324 } ) ;
13291325 afterEach ( ( ) => setInjectorProfiler ( null ) ) ;
13301326
1331- it ( 'should be able to inspect injector hierarchy structure' , fakeAsync ( ( ) => {
1327+ it ( 'should be able to inspect injector hierarchy structure' , async ( ) => {
13321328 class MyServiceA { }
13331329 @NgModule ( { providers : [ MyServiceA ] } )
13341330 class ModuleA { }
@@ -1368,8 +1364,7 @@ describe('getInjectorResolutionPath', () => {
13681364 ] ,
13691365 } ) ;
13701366 const root = TestBed . createComponent ( MyStandaloneComponent ) ;
1371- TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
1372- tick ( ) ;
1367+ await TestBed . inject ( Router ) . navigateByUrl ( '/lazy' ) ;
13731368 root . detectChanges ( ) ;
13741369
13751370 function onLazyComponentCreated ( ) {
@@ -1464,5 +1459,5 @@ describe('getInjectorResolutionPath', () => {
14641459
14651460 expect ( path [ 6 ] ) . toBeInstanceOf ( NullInjector ) ;
14661461 }
1467- } ) ) ;
1462+ } ) ;
14681463} ) ;
0 commit comments