File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -23,22 +23,18 @@ test('Price', (done) => {
23
23
connection . getAccountInfo ( mapping . productAccountKeys [ 0 ] ) . then ( ( accountInfo ) => {
24
24
if ( accountInfo && accountInfo . data ) {
25
25
const product = parseProductData ( accountInfo . data )
26
- if ( product . priceAccountKey ) {
27
- connection . getAccountInfo ( product . priceAccountKey ) . then ( ( accountInfo ) => {
28
- if ( accountInfo && accountInfo . data ) {
29
- const price = parsePriceData ( accountInfo . data )
30
- console . log ( product . product . symbol )
31
- console . log ( price )
32
- expect ( price . magic ) . toBe ( Magic )
33
- expect ( price . version ) . toBe ( Version )
34
- done ( )
35
- } else {
36
- done ( 'No price accountInfo' )
37
- }
38
- } )
39
- } else {
40
- done ( 'Product account has price account' )
41
- }
26
+ connection . getAccountInfo ( product . priceAccountKey ! ) . then ( ( accountInfo ) => {
27
+ if ( accountInfo && accountInfo . data ) {
28
+ const price = parsePriceData ( accountInfo . data )
29
+ console . log ( product . product . symbol )
30
+ console . log ( price )
31
+ expect ( price . magic ) . toBe ( Magic )
32
+ expect ( price . version ) . toBe ( Version )
33
+ done ( )
34
+ } else {
35
+ done ( 'No price accountInfo' )
36
+ }
37
+ } )
42
38
} else {
43
39
done ( 'No product accountInfo' )
44
40
}
You can’t perform that action at this time.
0 commit comments