test(aio): use MockLogger in AppComponent tests
This component sends a lot of messages to the console, which makes the test run less easy to follow.
This commit is contained in:
parent
2eb027a793
commit
20aab64c65
|
@ -11,6 +11,8 @@ import { AutoScrollService } from 'app/shared/auto-scroll.service';
|
|||
import { MockSearchService } from 'testing/search.service';
|
||||
import { LocationService } from 'app/shared/location.service';
|
||||
import { MockLocationService } from 'testing/location.service';
|
||||
import { Logger } from 'app/shared/logger.service';
|
||||
import { MockLogger } from 'testing/logger.service';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
let component: AppComponent;
|
||||
|
@ -24,7 +26,8 @@ describe('AppComponent', () => {
|
|||
{ provide: APP_BASE_HREF, useValue: '/' },
|
||||
{ provide: SearchService, useClass: MockSearchService },
|
||||
{ provide: GaService, useClass: TestGaService },
|
||||
{ provide: LocationService, useFactory: () => new MockLocationService(initialUrl) }
|
||||
{ provide: LocationService, useFactory: () => new MockLocationService(initialUrl) },
|
||||
{ provide: Logger, useClass: MockLogger }
|
||||
]
|
||||
});
|
||||
TestBed.compileComponents();
|
||||
|
|
Loading…
Reference in New Issue