import { TestBed , waitForAsync } from '@angular/core/testing' ; import { RouterTestingModule } from '@angular/router/testing' ; import { AppComponent } from './app.component' ; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner' ; import { CalendarModule , DateAdapter } from 'angular-calendar' ; import { adapterFactory } from 'angular-calendar/date-adapters/date-fns' ; import { SchedulerModule } from 'angular-calendar-scheduler' ; import { AppService } from './services/app.service' ; import { LOCALE_ID } from '@angular/core' ; describe ( 'AppComponent' , ( ) => { beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { imports : [ RouterTestingModule , MatProgressSpinnerModule , CalendarModule . forRoot ( { provide : DateAdapter , useFactory : adapterFactory } ) , SchedulerModule . forRoot ( { locale : 'en' , headerDateFormat : 'daysRange' , logEnabled : true } ) , ] , providers : [ AppService , { provide : LOCALE_ID , useValue : 'en-US' } ] , declarations : [ AppComponent ] , } ) . compileComponents ( ) ; } ) ) ; it ( 'should create the app' , ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . debugElement . componentInstance ; expect ( app ) . toBeTruthy ( ) ; } ) ; it ( `should have as title 'Angular Calendar Scheduler Demo'` , ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . debugElement . componentInstance ; expect ( app . title ) . toEqual ( 'Angular Calendar Scheduler Demo' ) ; } ) ; } ) ;