1 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 import { RouterTestingModule } from '@angular/router/testing';
4 import { BsDropdownModule } from 'ngx-bootstrap';
6 import { PerformanceCounterModule } from '../performance-counter.module';
7 import { TablePerformanceCounterService } from '../services/table-performance-counter.service';
8 import { PerformanceCounterComponent } from './performance-counter.component';
10 describe('PerformanceCounterComponent', () => {
11 let component: PerformanceCounterComponent;
12 let fixture: ComponentFixture<PerformanceCounterComponent>;
15 get: (service_type: string, service_id: string) => {
16 return new Promise(function(resolve, reject) {
21 return new Promise(function(resolve, reject) {
29 TestBed.configureTestingModule({
31 PerformanceCounterModule,
32 BsDropdownModule.forRoot(),
35 providers: [{ provide: TablePerformanceCounterService, useValue: fakeService }]
36 }).compileComponents();
41 fixture = TestBed.createComponent(PerformanceCounterComponent);
42 component = fixture.componentInstance;
43 fixture.detectChanges();
46 it('should create', () => {
47 expect(component).toBeTruthy();