mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
fixing tests
This commit is contained in:
parent
1cd61c0e22
commit
2f5dbd9ae2
@ -1,14 +1,21 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CLNodeInfoComponent } from './node-info.component';
|
||||
import { CommonService } from '../../../shared/services/common.service';
|
||||
|
||||
describe('CLNodeInfoComponent', () => {
|
||||
let component: CLNodeInfoComponent;
|
||||
let fixture: ComponentFixture<CLNodeInfoComponent>;
|
||||
const mockCommonService = jasmine.createSpyObj("CommonService",["getScreenSize","setScreenSize",
|
||||
"sortDescByKey","camelCase","titleCase","convertCurrency","convertWithoutFiat","convertWithFiat",
|
||||
"convertTime","convertTimestampToDate","downloadFile","convertToCSV"]);
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CLNodeInfoComponent ]
|
||||
declarations: [ CLNodeInfoComponent ],
|
||||
providers: [
|
||||
{ provide: CommonService, useValue: mockCommonService }
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
@ -1,14 +1,32 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CurrencyUnitConverterComponent } from './currency-unit-converter.component';
|
||||
import { CommonService } from '../../services/common.service';
|
||||
import { Store, StoreModule } from '@ngrx/store';
|
||||
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
||||
import { RTLReducer } from '../../../store/rtl.reducers';
|
||||
|
||||
describe('CurrencyUnitConverterComponent', () => {
|
||||
let component: CurrencyUnitConverterComponent;
|
||||
let fixture: ComponentFixture<CurrencyUnitConverterComponent>;
|
||||
const mockCommonService = jasmine.createSpyObj("CommonService",["getScreenSize","setScreenSize",
|
||||
"sortDescByKey","camelCase","titleCase","convertCurrency","convertWithoutFiat","convertWithFiat",
|
||||
"convertTime","convertTimestampToDate","downloadFile","convertToCSV"]);
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CurrencyUnitConverterComponent ]
|
||||
declarations: [ CurrencyUnitConverterComponent ],
|
||||
providers: [
|
||||
{ provide: CommonService, useValue: mockCommonService }
|
||||
],
|
||||
imports:[
|
||||
StoreModule.forRoot(RTLReducer, {
|
||||
runtimeChecks: {
|
||||
strictStateImmutability: false,
|
||||
strictActionImmutability: false
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user