import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { WidgetsComponent } from './widgets.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; describe('WidgetsComponent', () => { let component: WidgetsComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ WidgetsComponent ], imports:[HttpClientTestingModule,BrowserAnimationsModule] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(WidgetsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });