File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,38 @@ import { getDisplayValues } from '../src/utils/displayValues';
55import { resetExchangeRates } from '../src/store/actions/wallet' ;
66import { EUnit } from '../src/store/types/wallet' ;
77
8- global . fetch = require ( 'node-fetch' ) ;
8+ // @ts -ignore
9+ global . fetch = jest . fn ( ( ) =>
10+ Promise . resolve ( {
11+ json : ( ) =>
12+ Promise . resolve ( {
13+ tickers : [
14+ {
15+ symbol : 'BTCRUB' ,
16+ lastPrice : '3832499' ,
17+ base : 'BTC' ,
18+ baseName : 'Bitcoin' ,
19+ quote : 'RUB' ,
20+ quoteName : 'Russian Ruble' ,
21+ currencySymbol : '₽' ,
22+ currencyFlag : '🇷🇺' ,
23+ lastUpdatedAt : 1702295587246 ,
24+ } ,
25+ {
26+ symbol : 'BTCUSD' ,
27+ lastPrice : '42373.00' ,
28+ base : 'BTC' ,
29+ baseName : 'Bitcoin' ,
30+ quote : 'USD' ,
31+ quoteName : 'US Dollar' ,
32+ currencySymbol : '$' ,
33+ currencyFlag : '🇺🇸' ,
34+ lastUpdatedAt : 1702295629052 ,
35+ } ,
36+ ] ,
37+ } ) ,
38+ } ) ,
39+ ) ;
940
1041describe ( 'Pulls latest fiat exchange rates and checks the wallet store for valid conversions' , ( ) => {
1142 jest . setTimeout ( 10000 ) ;
You can’t perform that action at this time.
0 commit comments