import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RunComponent } from './run.component';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { RouterTestingModule } from '@angular/router/testing';
describe('RunComponent', () => {
let component: RunComponent;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ RunComponent ]
+ declarations: [ RunComponent ],
+ imports: [HttpClientTestingModule, RouterTestingModule]
})
.compileComponents();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should test ngOnInit method', () => {
+ component.ngOnInit();
+ component.reportType !== "Dashboard";
+ expect(component.stepNo).toEqual("8");
+ });
+
});