Skip to content

Commit 19cb81b

Browse files
committed
refactor: fix failing ut
TICKET: WP-7114
1 parent 3693873 commit 19cb81b

File tree

1 file changed

+5
-18
lines changed
  • modules/sdk-coin-tao/test/unit

1 file changed

+5
-18
lines changed

modules/sdk-coin-tao/test/unit/tao.ts

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,9 @@ describe('Tao:', function () {
7474
keychains,
7575
index: 0, // Wrong index for this address
7676
})
77-
.should.be.rejectedWith(/address validation failure/);
78-
});
79-
80-
it('should throw for missing index', async function () {
81-
const keychains = [
82-
{ commonKeychain: isWalletAddressTestData.commonKeychain },
83-
{ commonKeychain: isWalletAddressTestData.commonKeychain },
84-
{ commonKeychain: isWalletAddressTestData.commonKeychain },
85-
];
86-
87-
await baseCoin
88-
.isWalletAddress({
89-
address: isWalletAddressTestData.rootAddress,
90-
keychains,
91-
})
92-
.should.be.rejectedWith(/Invalid or missing index/);
77+
.should.be.rejectedWith(
78+
`address validation failure: ${isWalletAddressTestData.receiveAddress} is not a wallet address`
79+
);
9380
});
9481

9582
it('should throw for invalid address', async function () {
@@ -105,7 +92,7 @@ describe('Tao:', function () {
10592
keychains,
10693
index: 0,
10794
})
108-
.should.be.rejectedWith(/invalid address/);
95+
.should.be.rejectedWith('invalid address: invalidaddress');
10996
});
11097

11198
it('should throw for missing keychains', async function () {
@@ -115,7 +102,7 @@ describe('Tao:', function () {
115102
keychains: [],
116103
index: 0,
117104
})
118-
.should.be.rejectedWith(/missing required param keychains/);
105+
.should.be.rejectedWith('missing required param keychains');
119106
});
120107
});
121108

0 commit comments

Comments
 (0)