Skip to content

Commit

Permalink
fix: Add testing for old JSONURL
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Dec 5, 2023
1 parent 907320f commit 06dc5ae
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/lib/decodeData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,27 @@ describe('decodeData', () => {
valueType: 'bytes',
valueContent: 'JSONURL',
},
{
name: 'MyKeyName2:<bytes32>:<bool>',
key: '0x',
keyType: 'Singleton',
valueType: 'bytes',
valueContent: 'VerifiableURL',
},
{
name: 'MyDynamicKey:<address>',
key: '0x',
keyType: 'Singleton',
valueType: 'bytes',
valueContent: 'JSONURL',
},
{
name: 'MyDynamicKey2:<address>',
key: '0x',
keyType: 'Singleton',
valueType: 'bytes',
valueContent: 'VerifiableURL',
},
];

it('decodes each key', () => {
Expand Down Expand Up @@ -160,6 +174,21 @@ describe('decodeData', () => {
value:
'0x6f357c6a820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361697066733a2f2f516d597231564a4c776572673670456f73636468564775676f3339706136727963455a4c6a7452504466573834554178',
},
{
keyName: 'MyKeyName2:<bytes32>:<bool>',
dynamicKeyParts: [
'0xaaaabbbbccccddddeeeeffff111122223333444455556666777788889999aaaa',
'true',
],
value:
'0x00006f357c6a0020820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361697066733a2f2f516d597231564a4c776572673670456f73636468564775676f3339706136727963455a4c6a7452504466573834554178',
},
{
keyName: 'MyDynamicKey2:<address>',
dynamicKeyParts: '0xcafecafecafecafecafecafecafecafecafecafe',
value:
'0x00006f357c6a0020820464ddfac1bec070cc14a8daf04129871d458f2ca94368aae8391311af6361697066733a2f2f516d597231564a4c776572673670456f73636468564775676f3339706136727963455a4c6a7452504466573834554178',
},
{
keyName: 'KeyTwo',
value: '0x2222',
Expand Down

0 comments on commit 06dc5ae

Please sign in to comment.