|
1 | | -import { map, mergeMap, toArray } from 'rxjs/operators'; |
2 | | -import { AccountHttp } from '../../src/infrastructure/AccountHttp'; |
3 | | -import { MosaicHttp } from '../../src/infrastructure/MosaicHttp'; |
4 | | -import { Address } from '../../src/model/account/Address'; |
5 | | -import { MosaicService } from '../../src/service/MosaicService'; |
| 1 | +// import { map, mergeMap, toArray } from 'rxjs/operators'; |
| 2 | +// import { AccountHttp } from '../../src/infrastructure/AccountHttp'; |
| 3 | +// import { MosaicHttp } from '../../src/infrastructure/MosaicHttp'; |
| 4 | +// import { Address } from '../../src/model/account/Address'; |
| 5 | +// import { MosaicService } from '../../src/service/MosaicService'; |
6 | 6 |
|
7 | | -describe('MosaicService', () => { |
8 | | - let accountAddress: Address; |
9 | | - let accountHttp: AccountHttp; |
10 | | - let mosaicHttp: MosaicHttp; |
| 7 | +// describe('MosaicService', () => { |
| 8 | +// let accountAddress: Address; |
| 9 | +// let accountHttp: AccountHttp; |
| 10 | +// let mosaicHttp: MosaicHttp; |
11 | 11 |
|
12 | | - before((done) => { |
13 | | - const path = require('path'); |
14 | | - require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { |
15 | | - if (err) { |
16 | | - throw err; |
17 | | - } |
18 | | - const json = JSON.parse(data); |
19 | | - accountAddress = Address.createFromRawAddress(json.testAccount.address); |
20 | | - accountHttp = new AccountHttp(json.apiUrl); |
21 | | - mosaicHttp = new MosaicHttp(json.apiUrl); |
22 | | - done(); |
23 | | - }); |
24 | | - }); |
25 | | - it('should return the mosaic list skipping the expired mosaics', () => { |
26 | | - const mosaicService = new MosaicService(accountHttp, mosaicHttp); |
| 12 | +// before((done) => { |
| 13 | +// const path = require('path'); |
| 14 | +// require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { |
| 15 | +// if (err) { |
| 16 | +// throw err; |
| 17 | +// } |
| 18 | +// const json = JSON.parse(data); |
| 19 | +// accountAddress = Address.createFromRawAddress(json.testAccount.address); |
| 20 | +// accountHttp = new AccountHttp(json.apiUrl); |
| 21 | +// mosaicHttp = new MosaicHttp(json.apiUrl); |
| 22 | +// done(); |
| 23 | +// }); |
| 24 | +// }); |
| 25 | +// it('should return the mosaic list skipping the expired mosaics', () => { |
| 26 | +// const mosaicService = new MosaicService(accountHttp, mosaicHttp); |
27 | 27 |
|
28 | | - const address = accountAddress; |
| 28 | +// const address = accountAddress; |
29 | 29 |
|
30 | | - return mosaicService.mosaicsAmountViewFromAddress(address).pipe( |
31 | | - mergeMap((_) => _), |
32 | | - map((mosaic) => console.log('You have', mosaic.relativeAmount(), mosaic.fullName())), |
33 | | - toArray(), |
34 | | - ).toPromise(); |
35 | | - }); |
36 | | -}); |
| 30 | +// return mosaicService.mosaicsAmountViewFromAddress(address).pipe( |
| 31 | +// mergeMap((_) => _), |
| 32 | +// map((mosaic) => console.log('You have', mosaic.relativeAmount(), mosaic.fullName())), |
| 33 | +// toArray(), |
| 34 | +// ).toPromise(); |
| 35 | +// }); |
| 36 | +// }); |
0 commit comments