File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
packages/gator-permissions-snap/test/client Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -855,12 +855,20 @@ describe('AccountApiClient', () => {
855855 } ) ,
856856 } ) ;
857857
858- await expect (
859- client . getTokenBalanceAndMetadata ( {
860- chainId : mockChainId ,
861- account : mockAccount ,
862- } ) ,
863- ) . rejects . toThrow ( 'Invalid response structure' ) ;
858+ const result = await client . getTokenBalanceAndMetadata ( {
859+ chainId : mockChainId ,
860+ account : mockAccount ,
861+ } ) ;
862+
863+ expect ( result ) . toStrictEqual ( {
864+ balance : BigInt ( '1000000000000000000' ) ,
865+ decimals : 18 ,
866+ symbol : 'ETH' ,
867+ iconUrl :
868+ 'https://dev-static.cx.metamask.io/api/v1/tokenIcons/1/0x0000000000000000000000000000000000000000.png' ,
869+ } ) ;
870+
871+ expect ( mockFetch ) . toHaveBeenCalledTimes ( 4 ) ; // 2 balance calls + 2 metadata calls
864872 } ) ;
865873
866874 it ( 'succeeds on first attempt when no retry is needed' , async ( ) => {
You can’t perform that action at this time.
0 commit comments