Skip to content

Commit a26a501

Browse files
authored
Feature: create sandboxnet (#138)
Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
1 parent 46da87b commit a26a501

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

data/services.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
}
8787
}
8888
],
89+
"sandboxnet": [],
8990
"testnet": [
9091
{
9192
"f_type": "Service",

helpers/__tests__/paths.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
})

helpers/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const NETWORKS = {
22
CANARYNET: 'canarynet',
33
TESTNET: 'testnet',
4+
SANDBOXNET: 'sandboxnet',
45
MAINNET: 'mainnet',
56
LOCAL: 'local'
67
}
@@ -17,6 +18,7 @@ export const PATHS = {
1718
MAINNET: '/authn',
1819
MAINNET_EXPLICIT: '/mainnet/authn',
1920
TESTNET: '/testnet/authn',
21+
SANDBOXNET: '/sandboxnet/authn',
2022
CANARYNET: '/canarynet/authn',
2123
LOCAL: '/local/authn'
2224
}

0 commit comments

Comments
 (0)