src/app/test2/test2.component.spec.ts
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {Test2Component} from './test2.component';
import {RouterTestingModule} from '@angular/router/testing';
describe('Test2Component', () => {
let component: Test2Component;
let fixture: ComponentFixture<Test2Component>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [Test2Component],
imports: [RouterTestingModule]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Test2Component);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});