import { HttpClientTestingModule } from '@angular/common/http/testing' ; import { ComponentFixture , TestBed } from '@angular/core/testing' ; import { MatDialogModule } from '@angular/material/dialog' ; import { RouterTestingModule } from '@angular/router/testing' ; import { NavItem } from '../model/nav-item' ; import { MenuListItemComponent } from './menu-list-item.component' ; describe ( 'MenuListItemComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ) => { await TestBed . configureTestingModule ( { declarations : [ MenuListItemComponent ] , imports : [ RouterTestingModule , HttpClientTestingModule , MatDialogModule ] } ) . compileComponents ( ) ; } ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( MenuListItemComponent ) ; component = fixture . componentInstance ; let item = { } as NavItem ; component . item = item ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;