import { RendererService } from '../../renderer/renderer.service' ; import { ComponentFixture , TestBed , waitForAsync } from '@angular/core/testing' ; import { FontService } from '../loader/services' ; import { TextMeshComponent } from './text-mesh.component' ; import { StatsService } from '../../stats' ; describe ( 'text' , ( ) => { describe ( 'TextMeshComponent' , ( ) => { let component ; let fixture ; beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { declarations : [ TextMeshComponent ] , providers : [ StatsService , RendererService , FontService ] } ) ; fixture = TestBed . createComponent ( TextMeshComponent ) ; component = fixture . componentInstance ; component . castShadow = true ; return TestBed . compileComponents ( ) ; } ) ) ; it ( 'init' , ( ) => { fixture . detectChanges ( ) ; expect ( component ) . toBeTruthy ( ) ; } ) ; it ( 'text' , ( ) => { fixture . detectChanges ( ) ; expect ( component . text ) . toBe ( 'Text' ) ; } ) ; it ( 'color' , ( ) => { fixture . detectChanges ( ) ; expect ( component . materialColor ) . toBe ( '#DADADA' ) ; } ) ; } ) ; } ) ;