@@ -60,7 +60,7 @@ beforeAll(async () => {
60
60
getLatestPriceInfo : ( priceFeedId : string ) => {
61
61
return priceInfoMap . get ( priceFeedId ) ;
62
62
} ,
63
- addUpdateListener : ( _callback : ( priceFeed : PriceFeed ) => any ) => { } ,
63
+ addUpdateListener : ( _callback : ( priceInfo : PriceInfo ) => any ) => { } ,
64
64
getPriceIds : ( ) => new Set ( ) ,
65
65
} ;
66
66
@@ -72,20 +72,20 @@ beforeAll(async () => {
72
72
describe ( "Latest Price Feed Endpoint" , ( ) => {
73
73
test ( "When called with valid ids, returns correct price feed" , async ( ) => {
74
74
const ids = [ expandTo64Len ( "abcd" ) , expandTo64Len ( "3456" ) ] ;
75
- const resp = await request ( app ) . get ( "/latest_price_feeds" ) . query ( { ids } ) ;
75
+ const resp = await request ( app ) . get ( "/api/ latest_price_feeds" ) . query ( { ids } ) ;
76
76
expect ( resp . status ) . toBe ( StatusCodes . OK ) ;
77
77
expect ( resp . body . length ) . toBe ( 2 ) ;
78
78
expect ( resp . body ) . toContainEqual ( dummyPriceFeed ( ids [ 0 ] ) . toJson ( ) ) ;
79
79
expect ( resp . body ) . toContainEqual ( dummyPriceFeed ( ids [ 1 ] ) . toJson ( ) ) ;
80
80
} ) ;
81
81
82
- test ( "When called with some non-existant ids within ids, returns error mentioning non-existant ids" , async ( ) => {
82
+ test ( "When called with some non-existent ids within ids, returns error mentioning non-existent ids" , async ( ) => {
83
83
const ids = [
84
84
expandTo64Len ( "ab01" ) ,
85
85
expandTo64Len ( "3456" ) ,
86
86
expandTo64Len ( "effe" ) ,
87
87
] ;
88
- const resp = await request ( app ) . get ( "/latest_price_feeds" ) . query ( { ids } ) ;
88
+ const resp = await request ( app ) . get ( "/api/ latest_price_feeds" ) . query ( { ids } ) ;
89
89
expect ( resp . status ) . toBe ( StatusCodes . BAD_REQUEST ) ;
90
90
expect ( resp . body . message ) . toContain ( ids [ 0 ] ) ;
91
91
expect ( resp . body . message ) . not . toContain ( ids [ 1 ] ) ;
@@ -100,7 +100,7 @@ describe("Latest Vaa Bytes Endpoint", () => {
100
100
expandTo64Len ( "ef01" ) ,
101
101
expandTo64Len ( "3456" ) ,
102
102
] ;
103
- const resp = await request ( app ) . get ( "/latest_vaas" ) . query ( { ids } ) ;
103
+ const resp = await request ( app ) . get ( "/api/ latest_vaas" ) . query ( { ids } ) ;
104
104
expect ( resp . status ) . toBe ( StatusCodes . OK ) ;
105
105
expect ( resp . body . length ) . toBe ( 2 ) ;
106
106
expect ( resp . body ) . toContain (
@@ -111,13 +111,13 @@ describe("Latest Vaa Bytes Endpoint", () => {
111
111
) ;
112
112
} ) ;
113
113
114
- test ( "When called with some non-existant ids within ids, returns error mentioning non-existant ids" , async ( ) => {
114
+ test ( "When called with some non-existent ids within ids, returns error mentioning non-existent ids" , async ( ) => {
115
115
const ids = [
116
116
expandTo64Len ( "ab01" ) ,
117
117
expandTo64Len ( "3456" ) ,
118
118
expandTo64Len ( "effe" ) ,
119
119
] ;
120
- const resp = await request ( app ) . get ( "/latest_vaas" ) . query ( { ids } ) ;
120
+ const resp = await request ( app ) . get ( "/api/ latest_vaas" ) . query ( { ids } ) ;
121
121
expect ( resp . status ) . toBe ( StatusCodes . BAD_REQUEST ) ;
122
122
expect ( resp . body . message ) . toContain ( ids [ 0 ] ) ;
123
123
expect ( resp . body . message ) . not . toContain ( ids [ 1 ] ) ;
0 commit comments