2020-11-25 08:51:15 +01:00
|
|
|
import {fakeAsync, TestBed, tick} from '@angular/core/testing';
|
2020-11-04 13:35:20 +01:00
|
|
|
|
|
|
|
import { TransactionService } from './transaction.service';
|
2020-11-25 08:51:15 +01:00
|
|
|
import {HttpClient} from '@angular/common/http';
|
|
|
|
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
|
2020-11-04 13:35:20 +01:00
|
|
|
|
|
|
|
describe('TransactionService', () => {
|
2020-11-25 08:51:15 +01:00
|
|
|
let httpClient: HttpClient;
|
|
|
|
let httpTestingController: HttpTestingController;
|
2020-11-04 13:35:20 +01:00
|
|
|
let service: TransactionService;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
2020-11-25 08:51:15 +01:00
|
|
|
TestBed.configureTestingModule({
|
|
|
|
imports: [HttpClientTestingModule]
|
|
|
|
});
|
|
|
|
httpClient = TestBed.inject(HttpClient);
|
|
|
|
httpTestingController = TestBed.inject(HttpTestingController);
|
2020-11-04 13:35:20 +01:00
|
|
|
service = TestBed.inject(TransactionService);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be created', () => {
|
|
|
|
expect(service).toBeTruthy();
|
|
|
|
});
|
2020-11-25 08:51:15 +01:00
|
|
|
|
|
|
|
// it('#getUser() should fetch userInfo', fakeAsync(() => {
|
|
|
|
// expect(service.userInfo).toBeUndefined();
|
|
|
|
// service.getUser('0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D').then(
|
|
|
|
// );
|
|
|
|
// tick();
|
|
|
|
// expect(service.userInfo).toBe('Hey');
|
|
|
|
// }));
|
2020-11-04 13:35:20 +01:00
|
|
|
});
|