Skip to content

Commit

Permalink
web-ui: Fix ticker.component.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
JonSalazar committed Jan 21, 2019
1 parent 1b3effd commit 2c60f25
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion web-ui/src/app/components/ticker/ticker.component.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
}));
Expand Down

0 comments on commit 2c60f25

Please sign in to comment.