Skip to content

Commit c7b02d9

Browse files
committed
Polish test and its comments
1 parent ce0b676 commit c7b02d9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/test/components/ng-http-loader.component.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,19 +511,17 @@ describe('NgHttpLoaderComponent', () => {
511511
tick(1000);
512512
expect(component.isSpinnerVisible).toBeTruthy();
513513

514-
// the first HTTP request is finally over, the spinner is still visible
514+
// the first HTTP request is finally over, the spinner is still visible for at least 1 second
515515
firstRequest.flush({});
516516
tick();
517517
expect(component.isSpinnerVisible).toBeTruthy();
518518

519-
// 200 ms happen after the first HTTP request has finished, a second HTTP request is launched
519+
// But 200 ms after the first HTTP request has finished, a second HTTP request is launched
520520
tick(200);
521-
expect(component.isSpinnerVisible).toBeTruthy();
522-
523521
runQuery('/fake2').subscribe();
524522
const secondRequest = httpMock.expectOne('/fake2');
525523

526-
// After 900ms, the second http request ends. The spinner should still be visible
524+
// After 700ms, the second http request ends. The spinner is still visible
527525
tick(700);
528526
secondRequest.flush({});
529527
expect(component.isSpinnerVisible).toBeTruthy();

0 commit comments

Comments
 (0)