@@ -129,12 +129,8 @@ describe('NgHttpLoaderComponent', () => {
129129 } ) ;
130130
131131 it ( 'should show and hide the spinner according to the pending HTTP requests' , fakeAsync ( ( ) => {
132- function runQuery$ ( url : string ) : Observable < any > {
133- return http . get ( url ) ;
134- }
135-
132+ const runQuery$ = ( url : string ) : Observable < any > => http . get ( url ) ;
136133 forkJoin ( [ runQuery$ ( '/fake' ) , runQuery$ ( '/fake2' ) ] ) . subscribe ( ) ;
137-
138134 const firstRequest = httpMock . expectOne ( '/fake' ) ;
139135 const secondRequest = httpMock . expectOne ( '/fake2' ) ;
140136
@@ -397,13 +393,8 @@ describe('NgHttpLoaderComponent', () => {
397393
398394 it ( 'should correctly handle the debounce delay for multiple HTTP requests' , fakeAsync ( ( ) => {
399395 component . debounceDelay = 2000 ;
400-
401- function runQuery$ ( url : string ) : Observable < any > {
402- return http . get ( url ) ;
403- }
404-
396+ const runQuery$ = ( url : string ) : Observable < any > => http . get ( url ) ;
405397 forkJoin ( [ runQuery$ ( '/fake' ) , runQuery$ ( '/fake2' ) ] ) . subscribe ( ) ;
406-
407398 const firstRequest = httpMock . expectOne ( '/fake' ) ;
408399 const secondRequest = httpMock . expectOne ( '/fake2' ) ;
409400
@@ -544,13 +535,8 @@ describe('NgHttpLoaderComponent', () => {
544535
545536 it ( 'should correctly handle the minimum spinner duration for multiple HTTP requests' , fakeAsync ( ( ) => {
546537 component . minDuration = 5000 ;
547-
548- function runQuery$ ( url : string ) : Observable < any > {
549- return http . get ( url ) ;
550- }
551-
538+ const runQuery$ = ( url : string ) : Observable < any > => http . get ( url ) ;
552539 forkJoin ( [ runQuery$ ( '/fake' ) , runQuery$ ( '/fake2' ) ] ) . subscribe ( ) ;
553-
554540 const firstRequest = httpMock . expectOne ( '/fake' ) ;
555541 const secondRequest = httpMock . expectOne ( '/fake2' ) ;
556542
@@ -587,13 +573,8 @@ describe('NgHttpLoaderComponent', () => {
587573
588574 it ( 'should correctly handle the extra spinner duration for multiple HTTP requests' , fakeAsync ( ( ) => {
589575 component . extraDuration = 5000 ;
590-
591- function runQuery$ ( url : string ) : Observable < any > {
592- return http . get ( url ) ;
593- }
594-
576+ const runQuery$ = ( url : string ) : Observable < any > => http . get ( url ) ;
595577 forkJoin ( [ runQuery$ ( '/fake' ) , runQuery$ ( '/fake2' ) ] ) . subscribe ( ) ;
596-
597578 const firstRequest = httpMock . expectOne ( '/fake' ) ;
598579 const secondRequest = httpMock . expectOne ( '/fake2' ) ;
599580
@@ -634,7 +615,6 @@ describe('NgHttpLoaderComponent', () => {
634615
635616 it ( 'should correctly handle the minimum spinner duration for multiple HTTP requests ran one after the others' , fakeAsync ( ( ) => {
636617 component . minDuration = 2000 ;
637-
638618 http . get ( '/fake' ) . subscribe ( ) ;
639619 const firstRequest = httpMock . expectOne ( '/fake' ) ;
640620
@@ -667,11 +647,7 @@ describe('NgHttpLoaderComponent', () => {
667647
668648 it ( 'should handle the extra spinner duration for multiple HTTP requests ran one after the others' , fakeAsync ( ( ) => {
669649 component . extraDuration = 10 ;
670-
671- function runQuery$ ( url : string ) : Observable < any > {
672- return http . get ( url ) ;
673- }
674-
650+ const runQuery$ = ( url : string ) : Observable < any > => http . get ( url ) ;
675651 runQuery$ ( '/fake' ) . subscribe ( ) ;
676652 const firstRequest = httpMock . expectOne ( '/fake' ) ;
677653
0 commit comments