import { ComponentFixture , TestBed } from "@angular/core/testing" ; import { AthleteSettingsComponent } from "./athlete-settings.component" ; import { CoreModule } from "../../core/core.module" ; import { SharedModule } from "../../shared/shared.module" ; import { AthleteSettingsModule } from "../athlete-settings.module" ; import * as _ from "lodash" ; import { userSettingsData } from "@elevate/shared/data" ; import { UserSettingsService } from "../../shared/services/user-settings/user-settings.service" ; import { AthleteService } from "../../shared/services/athlete/athlete.service" ; import { AthleteModel } from "@elevate/shared/models" ; describe ( "AthleteSettingsComponent" , ( ) => { let component ; let fixture ; let userSettingsService ; let athleteService ; beforeEach ( ( done ) => { TestBed . configureTestingModule ( { imports : [ CoreModule , SharedModule , AthleteSettingsModule ] } ) . compileComponents ( ) ; userSettingsService = TestBed . get ( UserSettingsService ) ; athleteService = TestBed . get ( AthleteService ) ; spyOn ( userSettingsService , "fetch" ) . and . returnValue ( Promise . resolve ( _ . cloneDeep ( userSettingsData ) ) ) ; spyOn ( athleteService , "fetch" ) . and . returnValue ( Promise . resolve ( AthleteModel . DEFAULT_MODEL ) ) ; done ( ) ; } ) ; beforeEach ( ( done ) => { fixture = TestBed . createComponent ( AthleteSettingsComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; done ( ) ; } ) ; it ( "should create" , ( done ) => { expect ( component ) . toBeTruthy ( ) ; done ( ) ; } ) ; } ) ;