@@ -9,39 +9,48 @@ import { getThresholdLib } from "../getThresholdLib"
9
9
const MOCK_ADDRESSES : Record < StakingAppName , string > = {
10
10
tbtc : getThresholdLib ( ) . multiAppStaking . ecdsa . address ,
11
11
randomBeacon : getThresholdLib ( ) . multiAppStaking . randomBeacon . address ,
12
+ taco : getThresholdLib ( ) . multiAppStaking . taco . address ,
12
13
}
13
14
const MOCK_LABELS : Record < StakingAppName , string > = {
14
15
tbtc : "tBTC" ,
15
16
randomBeacon : "Random Beacon" ,
17
+ taco : "TACo" ,
16
18
}
17
- const MOCK_APP_NAMES : StakingAppName [ ] = [ "tbtc" , "randomBeacon" ]
19
+ const MOCK_APP_NAMES : StakingAppName [ ] = [ "tbtc" , "randomBeacon" , "taco" ]
18
20
19
21
describe ( "Staking app label utils tests" , ( ) => {
20
- const [ tbtcName , rbName ] = MOCK_APP_NAMES
22
+ const [ tbtcName , rbName , tacoName ] = MOCK_APP_NAMES
21
23
const tbtcAddress = MOCK_ADDRESSES [ tbtcName ]
22
24
const rbAddress = MOCK_ADDRESSES [ rbName ]
25
+ const tacoAddress = MOCK_ADDRESSES [ tacoName ]
23
26
24
27
it ( "returns correct app label if app address is given" , ( ) => {
25
28
const resultTbtcLabel = getStakingAppLabelFromAppAddress ( tbtcAddress )
26
29
const resultRbLabel = getStakingAppLabelFromAppAddress ( rbAddress )
30
+ const resultTacoLabel = getStakingAppLabelFromAppAddress ( tacoAddress )
27
31
28
32
expect ( resultTbtcLabel ) . toBe ( MOCK_LABELS [ tbtcName ] )
29
33
expect ( resultRbLabel ) . toBe ( MOCK_LABELS [ rbName ] )
34
+ expect ( resultTacoLabel ) . toBe ( MOCK_LABELS [ tacoName ] )
30
35
} )
31
36
32
37
it ( "returns correct app label if app name is given" , ( ) => {
33
38
const resultTbtcLabel = getStakingAppLabelFromAppName ( tbtcName )
34
39
const resultRbLabel = getStakingAppLabelFromAppName ( rbName )
40
+ const resultTacoLabel = getStakingAppLabelFromAppName ( tacoName )
35
41
36
42
expect ( resultTbtcLabel ) . toBe ( MOCK_LABELS [ tbtcName ] )
37
43
expect ( resultRbLabel ) . toBe ( MOCK_LABELS [ rbName ] )
44
+ expect ( resultTacoLabel ) . toBe ( MOCK_LABELS [ tacoName ]
38
45
} )
39
46
40
47
it ( "returns correct app name if address is given" , ( ) => {
41
48
const resultTbtcName = getStakingAppNameFromAppAddress ( tbtcAddress )
42
49
const resultRbName = getStakingAppNameFromAppAddress ( rbAddress )
50
+ const resultTacoName = getStakingAppNameFromAppAddress ( tacoAddress )
43
51
44
52
expect ( resultTbtcName ) . toBe ( tbtcName )
45
53
expect ( resultRbName ) . toBe ( rbName )
54
+ expect ( resultTacoName ) . toBe ( tacoName )
46
55
} )
47
56
} )
0 commit comments