/* import { TestBed, async, fakeAsync, ComponentFixture } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { MockBackend } from '@angular/http/testing'; import { HttpModule } from '@angular/http'; import { SharedService } from './shared/shared.service'; import { AppComponent } from './app.component'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { PopupComponent } from './shared/popup/popup.component'; import { HttpClient, HttpHandler } from '@angular/common/http'; import { CartService } from './services/cart.service'; import { CustomerService } from './services/customer.service'; import { LookupService } from './services/lookup.service'; import { LoggingService } from './services/logging.service'; import { TradeinService } from './services/tradein.service'; import { CatalogService } from './services/catalog.service'; import { CheckoutService } from './services/checkout.service'; import { UserService } from './services/user.service'; describe('App Component', () => { let component: AppComponent; let fixture: ComponentFixture; let spyNavigate: any; let sharedService: SharedService; beforeEach(async(() => { TestBed.configureTestingModule({ providers: [ MockBackend, SharedService, CartService, CustomerService, LookupService, LoggingService, TradeinService, CatalogService, CheckoutService, HttpClient, HttpHandler ], imports: [ HttpClientTestingModule, HttpModule, RouterTestingModule ], declarations: [AppComponent, PopupComponent] }); fixture = TestBed.createComponent(AppComponent); component = fixture.componentInstance; TestBed.get(sharedService); TestBed.compileComponents(); spyNavigate = spyOn(component.router, 'navigate'); })); fit('should be created', () => { expect(component).toBeTruthy(); }); fit('All methods are defined', async(() => { expect(component.clearSession).toBeDefined(); })); fit('should resolve clear session test data', fakeAsync(() => { spyOn(component.sharedService, 'showSpinner') spyOn(component.sharedService, 'clearSessionStorage') component.clearSession(); expect(component.sharedService.showSpinner).toHaveBeenCalledWith(false); expect(component.sharedService.clearSessionStorage).toHaveBeenCalledWith(true); expect(spyNavigate).toHaveBeenCalledWith(['login']); })); }); */