Update text-editor.component.spec.ts

This commit is contained in:
Piotr Pekala 2019-08-01 00:51:42 -07:00
parent 07aefc6933
commit ee2d755eb0

View File

@ -6,10 +6,17 @@ import { ToolsService } from '../../../services/tools.service';
import { Context } from '../../models/context';
import { Renderer2 } from '@angular/core';
import { MapScaleService } from '../../../services/mapScale.service';
import { LinkService } from '../../../services/link.service';
import { NodesDataSource } from '../../datasources/nodes-datasource';
import { LinksDataSource } from '../../datasources/links-datasource';
import { SelectionManager } from '../../managers/selection-manager';
import { FontFixer } from '../../helpers/font-fixer';
import { MockedLinkService } from '../../../components/project-map/project-map.component.spec';
describe('TemporaryTextElementComponent', () => {
describe('TextEditorComponent', () => {
let component: TextEditorComponent;
let fixture: ComponentFixture<TextEditorComponent>;
let mockedLinkService: MockedLinkService = new MockedLinkService();
beforeEach(async(() => {
TestBed.configureTestingModule({
@ -19,7 +26,12 @@ describe('TemporaryTextElementComponent', () => {
{ provide: ToolsService, useClass: ToolsService },
{ provide: Context, useClass: Context },
{ provide: Renderer2, useClass: Renderer2 },
{ provide: MapScaleService, useClass: MapScaleService }
{ provide: MapScaleService, useClass: MapScaleService },
{ provide: LinkService, useValue: mockedLinkService },
{ provide: NodesDataSource, useClass: NodesDataSource },
{ provide: LinksDataSource, useClass: LinksDataSource },
{ provide: SelectionManager, useClass: SelectionManager },
{ provide: FontFixer, useClass: FontFixer }
],
declarations: [TextEditorComponent]
}).compileComponents();