diff --git a/web-ui/src/app/components/ticker/ticker.component.spec.ts b/web-ui/src/app/components/ticker/ticker.component.spec.ts index 72b804f..169de88 100644 --- a/web-ui/src/app/components/ticker/ticker.component.spec.ts +++ b/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; + const tickerServiceSpy: jasmine.SpyObj = 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(); }));