File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1047,6 +1047,22 @@ describe('SBTProxy', () => {
1047
1047
) . to . be . revertedWith (
1048
1048
'TransparentUpgradeableProxy: admin cannot fallback to proxy target'
1049
1049
)
1050
+
1051
+ const uri = await sbt . tokenURI ( 1 )
1052
+ const uriInfo : string [ ] = uri . split ( ',' )
1053
+ expect ( uriInfo [ 0 ] ) . to . equal ( 'data:application/json;base64' )
1054
+ const decodedData = JSON . parse (
1055
+ Buffer . from ( uriInfo [ 1 ] , 'base64' ) . toString ( )
1056
+ ) as {
1057
+ name : string
1058
+ description : string
1059
+ image : string
1060
+ attributes : any [ ]
1061
+ }
1062
+ expect ( decodedData . name ) . to . eq ( metadata . name )
1063
+ expect ( decodedData . description ) . to . eq ( metadata . description )
1064
+ expect ( decodedData . image ) . to . eq ( metadata . tokenURIImage )
1065
+ expect ( decodedData . attributes . length ) . to . eq ( 0 )
1050
1066
} )
1051
1067
1052
1068
it ( 'The setTokenURI function should function correctly for no attributes' , async ( ) => {
You can’t perform that action at this time.
0 commit comments