Browse Source

web-ui: Fix ticker.component.spec

prometheus-integration
jonsadev 6 years ago
parent
commit
2c60f25d21
  1. 21
      web-ui/src/app/components/ticker/ticker.component.spec.ts

21
web-ui/src/app/components/ticker/ticker.component.spec.ts

@ -1,14 +1,33 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TickerComponent } from './ticker.component';
import { ExplorerCurrencyPipe } from '../../pipes/explorer-currency.pipe';
import { TranslateModule } from '@ngx-translate/core';
import { TickerService } from '../../services/ticker.service';
import { Observable } from 'rxjs';
describe('TickerComponent', () => {
let component: TickerComponent;
let fixture: ComponentFixture<TickerComponent>;
const tickerServiceSpy: jasmine.SpyObj<TickerService> = jasmine.createSpyObj('TickerService', ['get']);
beforeEach(async(() => {
tickerServiceSpy.get.and.returnValue(Observable.create());
TestBed.configureTestingModule({
declarations: [ TickerComponent ]
declarations: [
TickerComponent,
ExplorerCurrencyPipe
],
imports: [
TranslateModule.forRoot()
],
providers: [
{ provide: TickerService, useValue: tickerServiceSpy }
]
})
.compileComponents();
}));

Loading…
Cancel
Save