File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
packages/use-agently/src/commands Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ describe("balance command", () => {
2929
3030 const parsed = out . json as Record < string , unknown > ;
3131 expect ( parsed . address ) . toStrictEqual ( TEST_ADDRESS ) ;
32- expect ( parsed . currency ) . toStrictEqual ( "USDC" ) ;
33- expect ( parsed . network ) . toStrictEqual ( "Base" ) ;
34- expect ( Number ( parsed . balance as string ) ) . toBeGreaterThan ( 0 ) ;
32+ const balance = parsed . balance as Record < string , unknown > ;
33+ expect ( balance . currency ) . toStrictEqual ( "USDC" ) ;
34+ expect ( balance . network ) . toStrictEqual ( "Base" ) ;
35+ expect ( Number ( balance . value as string ) ) . toBeGreaterThan ( 0 ) ;
3536 } ) ;
3637
3738 test ( "json output" , async ( ) => {
@@ -40,12 +41,15 @@ describe("balance command", () => {
4041 const parsed = out . json as Record < string , unknown > ;
4142 expect ( parsed ) . toStrictEqual ( {
4243 address : TEST_ADDRESS ,
43- currency : "USDC" ,
44- network : "Base" ,
45- balance : expect . any ( String ) ,
44+ balance : {
45+ currency : "USDC" ,
46+ network : "Base" ,
47+ value : expect . any ( String ) ,
48+ } ,
4649 provider : "local" ,
4750 otherProviders : [ ] ,
51+ website : expect . any ( String ) ,
4852 } ) ;
49- expect ( Number ( parsed . balance ) ) . toBeGreaterThan ( 0 ) ;
53+ expect ( Number ( ( parsed . balance as Record < string , unknown > ) . value ) ) . toBeGreaterThan ( 0 ) ;
5054 } ) ;
5155} ) ;
You can’t perform that action at this time.
0 commit comments