import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { MockComponents } from 'ng-mocks' ; import { UserBoxComponent } from '../../components/user-box/user-box.component' ; import { UserComponent } from './user.component' ; describe ( 'UserComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ UserComponent , MockComponents ( UserBoxComponent ) ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( UserComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;