import { ComponentFixture , TestBed } from "@angular/core/testing" ; import { FitnessInfoDialogComponent } from "./fitness-info-dialog.component" ; import { CoreModule } from "../../core/core.module" ; import { MAT_DIALOG_DATA , MatDialogRef } from "@angular/material" ; import { SharedModule } from "../../shared/shared.module" ; import { FitnessTrendModule } from "../fitness-trend.module" ; describe ( "FitnessInfoDialogComponent" , ( ) => { let component ; let fixture ; beforeEach ( ( done ) => { TestBed . configureTestingModule ( { imports : [ CoreModule , SharedModule , FitnessTrendModule ] , declarations : [ ] , providers : [ { provide : MAT_DIALOG_DATA , useValue : { } , } , { provide : MatDialogRef , useValue : { } , } , ] } ) . compileComponents ( ) ; done ( ) ; } ) ; beforeEach ( ( done ) => { fixture = TestBed . createComponent ( FitnessInfoDialogComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; done ( ) ; } ) ; it ( "should create" , ( done ) => { const compiled = fixture . debugElement . nativeElement ; const htmlContent = compiled . querySelector ( "mat-dialog-content" ) . textContent ; expect ( component ) . toBeTruthy ( ) ; expect ( htmlContent ) . not . toBeNull ( ) ; done ( ) ; } ) ; } ) ;