import { provideHttpClient } from '@angular/common/http';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { CommonModule, DatePipe, DecimalPipe } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { HomeComponent } from './home.component';
import { AppRoutesModule } from '../app.routes.module';
import { BreadcrumbService } from '../breadcrumb.service';
import { ServicesModule } from '../../providers/services.module';
import { FunctionService } from '../components/models/function.service';

describe('HomeComponent', () =>
{
  beforeEach(waitForAsync(() =>
  {
    TestBed.configureTestingModule({
      imports: [
        BrowserAnimationsModule,
        AppRoutesModule,
        CommonModule,
        ServicesModule,
        HomeComponent
      ],
      providers: [
        provideHttpClient(),
        DatePipe,
        DecimalPipe,
        FunctionService,
        BreadcrumbService
      ]
    }).compileComponents();
  }));
  it('Component created successfully...', waitForAsync(() =>
  {
    const fixture = TestBed.createComponent(HomeComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  }));
});
