@@ -6,16 +6,19 @@ describe('paths helpers: createPathFromArray', () => {
66 const arrTwo = [ 'mainnet' , 'authn' ]
77 const arrThree = [ 'testnet' , 'authn' ]
88 const arrFour = [ 'canarynet' , 'authn' ]
9+ const arrFive = [ 'sandboxnet' , 'authn' ]
910
1011 const expectedResponseOne = '/authn'
1112 const expectedResponseTwo = '/mainnet/authn'
1213 const expectedResponseThree = '/testnet/authn'
1314 const expectedResponseFour = '/canarynet/authn'
15+ const expectedResponseFive = '/sandboxnet/authn'
1416
1517 expect ( createPathFromArray ( arrOne ) ) . toEqual ( expectedResponseOne )
1618 expect ( createPathFromArray ( arrTwo ) ) . toEqual ( expectedResponseTwo )
1719 expect ( createPathFromArray ( arrThree ) ) . toEqual ( expectedResponseThree )
1820 expect ( createPathFromArray ( arrFour ) ) . toEqual ( expectedResponseFour )
21+ expect ( createPathFromArray ( arrFive ) ) . toEqual ( expectedResponseFive )
1922 } )
2023} )
2124
@@ -26,12 +29,14 @@ describe('paths helpers: isValidPath', () => {
2629 const pathThree = [ 'testnet' , 'authn' ]
2730 const pathFour = [ 'canarynet' , 'authn' ]
2831 const pathFive = [ 'foo' , 'bar' ]
32+ const pathSix = [ 'sandboxnet' , 'authn' ]
2933
3034 expect ( isValidPath ( pathOne ) ) . toBe ( true )
3135 expect ( isValidPath ( pathTwo ) ) . toBe ( true )
3236 expect ( isValidPath ( pathThree ) ) . toBe ( true )
3337 expect ( isValidPath ( pathFour ) ) . toBe ( true )
3438 expect ( isValidPath ( pathFive ) ) . toBe ( false )
39+ expect ( isValidPath ( pathSix ) ) . toBe ( true )
3540 expect ( isValidPath ( null ) ) . toBe ( false )
3641 } )
3742} )
@@ -41,9 +46,11 @@ describe('paths helpers: getNetworkFromPath', () => {
4146 const pathOne = [ 'authn' ]
4247 const pathTwo = [ 'testnet' , 'authn' ]
4348 const pathThree = [ 'canarynet' , 'authn' ]
49+ const pathFour = [ 'sandboxnet' , 'authn' ]
4450
4551 expect ( getNetworkFromPath ( pathOne ) ) . toEqual ( 'mainnet' )
4652 expect ( getNetworkFromPath ( pathTwo ) ) . toEqual ( 'testnet' )
4753 expect ( getNetworkFromPath ( pathThree ) ) . toEqual ( 'canarynet' )
54+ expect ( getNetworkFromPath ( pathFour ) ) . toEqual ( 'sandboxnet' )
4855 } )
4956} )
0 commit comments