From 20aab64c652e5d3d8ba4810f26776f70268a76bb Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 21 Mar 2017 06:33:21 +0000 Subject: [PATCH] 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. --- aio/src/app/app.component.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aio/src/app/app.component.spec.ts b/aio/src/app/app.component.spec.ts index 17edc77854..6c5674158a 100644 --- a/aio/src/app/app.component.spec.ts +++ b/aio/src/app/app.component.spec.ts @@ -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();