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:
Peter Bacon Darwin 2017-03-21 06:33:21 +00:00 committed by Miško Hevery
parent 2eb027a793
commit 20aab64c65
1 changed files with 4 additions and 1 deletions

View File

@ -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();