@@ -60,7 +60,7 @@ beforeAll(async () => {
6060 getLatestPriceInfo : ( priceFeedId : string ) => {
6161 return priceInfoMap . get ( priceFeedId ) ;
6262 } ,
63- addUpdateListener : ( _callback : ( priceFeed : PriceFeed ) => any ) => { } ,
63+ addUpdateListener : ( _callback : ( priceInfo : PriceInfo ) => any ) => { } ,
6464 getPriceIds : ( ) => new Set ( ) ,
6565 } ;
6666
@@ -72,20 +72,20 @@ beforeAll(async () => {
7272describe ( "Latest Price Feed Endpoint" , ( ) => {
7373 test ( "When called with valid ids, returns correct price feed" , async ( ) => {
7474 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 } ) ;
7676 expect ( resp . status ) . toBe ( StatusCodes . OK ) ;
7777 expect ( resp . body . length ) . toBe ( 2 ) ;
7878 expect ( resp . body ) . toContainEqual ( dummyPriceFeed ( ids [ 0 ] ) . toJson ( ) ) ;
7979 expect ( resp . body ) . toContainEqual ( dummyPriceFeed ( ids [ 1 ] ) . toJson ( ) ) ;
8080 } ) ;
8181
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 ( ) => {
8383 const ids = [
8484 expandTo64Len ( "ab01" ) ,
8585 expandTo64Len ( "3456" ) ,
8686 expandTo64Len ( "effe" ) ,
8787 ] ;
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 } ) ;
8989 expect ( resp . status ) . toBe ( StatusCodes . BAD_REQUEST ) ;
9090 expect ( resp . body . message ) . toContain ( ids [ 0 ] ) ;
9191 expect ( resp . body . message ) . not . toContain ( ids [ 1 ] ) ;
@@ -100,7 +100,7 @@ describe("Latest Vaa Bytes Endpoint", () => {
100100 expandTo64Len ( "ef01" ) ,
101101 expandTo64Len ( "3456" ) ,
102102 ] ;
103- const resp = await request ( app ) . get ( "/latest_vaas" ) . query ( { ids } ) ;
103+ const resp = await request ( app ) . get ( "/api/ latest_vaas" ) . query ( { ids } ) ;
104104 expect ( resp . status ) . toBe ( StatusCodes . OK ) ;
105105 expect ( resp . body . length ) . toBe ( 2 ) ;
106106 expect ( resp . body ) . toContain (
@@ -111,13 +111,13 @@ describe("Latest Vaa Bytes Endpoint", () => {
111111 ) ;
112112 } ) ;
113113
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 ( ) => {
115115 const ids = [
116116 expandTo64Len ( "ab01" ) ,
117117 expandTo64Len ( "3456" ) ,
118118 expandTo64Len ( "effe" ) ,
119119 ] ;
120- const resp = await request ( app ) . get ( "/latest_vaas" ) . query ( { ids } ) ;
120+ const resp = await request ( app ) . get ( "/api/ latest_vaas" ) . query ( { ids } ) ;
121121 expect ( resp . status ) . toBe ( StatusCodes . BAD_REQUEST ) ;
122122 expect ( resp . body . message ) . toContain ( ids [ 0 ] ) ;
123123 expect ( resp . body . message ) . not . toContain ( ids [ 1 ] ) ;
0 commit comments