Skip to content

Commit 8024425

Browse files
committed
Add TACo app to testing
1 parent 510ebac commit 8024425

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/utils/__tests__/getStakingAppLabel.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,48 @@ import { getThresholdLib } from "../getThresholdLib"
99
const MOCK_ADDRESSES: Record<StakingAppName, string> = {
1010
tbtc: getThresholdLib().multiAppStaking.ecdsa.address,
1111
randomBeacon: getThresholdLib().multiAppStaking.randomBeacon.address,
12+
taco: getThresholdLib().multiAppStaking.taco.address,
1213
}
1314
const MOCK_LABELS: Record<StakingAppName, string> = {
1415
tbtc: "tBTC",
1516
randomBeacon: "Random Beacon",
17+
taco: "TACo",
1618
}
17-
const MOCK_APP_NAMES: StakingAppName[] = ["tbtc", "randomBeacon"]
19+
const MOCK_APP_NAMES: StakingAppName[] = ["tbtc", "randomBeacon", "taco"]
1820

1921
describe("Staking app label utils tests", () => {
20-
const [tbtcName, rbName] = MOCK_APP_NAMES
22+
const [tbtcName, rbName, tacoName] = MOCK_APP_NAMES
2123
const tbtcAddress = MOCK_ADDRESSES[tbtcName]
2224
const rbAddress = MOCK_ADDRESSES[rbName]
25+
const tacoAddress = MOCK_ADDRESSES[tacoName]
2326

2427
it("returns correct app label if app address is given", () => {
2528
const resultTbtcLabel = getStakingAppLabelFromAppAddress(tbtcAddress)
2629
const resultRbLabel = getStakingAppLabelFromAppAddress(rbAddress)
30+
const resultTacoLabel = getStakingAppLabelFromAppAddress(tacoAddress)
2731

2832
expect(resultTbtcLabel).toBe(MOCK_LABELS[tbtcName])
2933
expect(resultRbLabel).toBe(MOCK_LABELS[rbName])
34+
expect(resultTacoLabel).toBe(MOCK_LABELS[tacoName])
3035
})
3136

3237
it("returns correct app label if app name is given", () => {
3338
const resultTbtcLabel = getStakingAppLabelFromAppName(tbtcName)
3439
const resultRbLabel = getStakingAppLabelFromAppName(rbName)
40+
const resultTacoLabel = getStakingAppLabelFromAppName(tacoName)
3541

3642
expect(resultTbtcLabel).toBe(MOCK_LABELS[tbtcName])
3743
expect(resultRbLabel).toBe(MOCK_LABELS[rbName])
44+
expect(resultTacoLabel).toBe(MOCK_LABELS[tacoName]
3845
})
3946

4047
it("returns correct app name if address is given", () => {
4148
const resultTbtcName = getStakingAppNameFromAppAddress(tbtcAddress)
4249
const resultRbName = getStakingAppNameFromAppAddress(rbAddress)
50+
const resultTacoName = getStakingAppNameFromAppAddress(tacoAddress)
4351

4452
expect(resultTbtcName).toBe(tbtcName)
4553
expect(resultRbName).toBe(rbName)
54+
expect(resultTacoName).toBe(tacoName)
4655
})
4756
})

0 commit comments

Comments
 (0)