Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
| 2 | |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 3 | import { LogService } from '../../log.service'; |
| 4 | import { ConsoleLoggerService } from '../../consolelogger.service'; |
| 5 | import { IconComponent } from './icon.component'; |
| 6 | import { IconService } from '../icon.service'; |
Sean Condon | 49e15be | 2018-05-16 16:58:29 +0100 | [diff] [blame] | 7 | |
| 8 | class MockIconService {} |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 9 | |
| 10 | describe('IconComponent', () => { |
Sean Condon | 49e15be | 2018-05-16 16:58:29 +0100 | [diff] [blame] | 11 | let log: LogService; |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 12 | |
Sean Condon | 49e15be | 2018-05-16 16:58:29 +0100 | [diff] [blame] | 13 | beforeEach(() => { |
| 14 | log = new ConsoleLoggerService(); |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 15 | |
Sean Condon | 49e15be | 2018-05-16 16:58:29 +0100 | [diff] [blame] | 16 | TestBed.configureTestingModule({ |
| 17 | declarations: [ IconComponent ], |
| 18 | providers: [ |
| 19 | { provide: LogService, useValue: log }, |
| 20 | { provide: IconService, useClass: MockIconService }, |
| 21 | ] |
| 22 | }); |
| 23 | }); |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 24 | |
Sean Condon | 49e15be | 2018-05-16 16:58:29 +0100 | [diff] [blame] | 25 | it('should create', () => { |
| 26 | const fixture = TestBed.createComponent(IconComponent); |
| 27 | const component = fixture.componentInstance; |
| 28 | expect(component).toBeTruthy(); |
| 29 | }); |
Sean Condon | 83fc39f | 2018-04-19 18:56:13 +0100 | [diff] [blame] | 30 | }); |