1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3 import { RunComponent } from './run.component';
4 import { HttpClientTestingModule } from '@angular/common/http/testing';
5 import { RouterTestingModule } from '@angular/router/testing';
7 describe('RunComponent', () => {
8 let component: RunComponent;
9 let fixture: ComponentFixture<RunComponent>;
11 beforeEach(async(() => {
12 TestBed.configureTestingModule({
13 declarations: [ RunComponent ],
14 imports: [HttpClientTestingModule, RouterTestingModule]
20 fixture = TestBed.createComponent(RunComponent);
21 component = fixture.componentInstance;
22 fixture.detectChanges();
25 it('should create', () => {
26 expect(component).toBeTruthy();
29 it('should test ngOnInit method', () => {
30 component.reportType = "Dashboard";
32 expect(component.stepNo).toEqual("4");
34 component.reportType = "test";
36 expect(component.stepNo).toEqual("8");