Skip to content

Commit

Permalink
fix: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-matto committed Jun 7, 2024
1 parent 4537a32 commit 39132fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/src/utils/address.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ describe('Validate address against network and checksums', function () {
it(`isAddress should return true for valid EVM address`, function () {
expect(isAddress(address.EVM)).to.be.eq(true);
});
it(`isAddress should return true with EVM-valid Uint8Array`, function () {
expect(isAddress(new Uint8Array(20))).to.be.eq(true);
});
it(`isAddress should return false for non 40-length string`, function () {
expect(isAddress('should return false')).to.be.eq(false);
});
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"test:e2e:tx-decoder": "NODE_ENV=test mocha --timeout 0 --require ./node_modules/ts-node/register --exit --color ./lib/e2e/tx-decoder/*.ts",
"test:e2e:offline-signing": "NODE_ENV=test mocha --timeout 0 --require ./node_modules/ts-node/register --exit --color ./lib/e2e/offline-signing/*.ts",
"test:e2e:ibc": "NODE_ENV=test mocha --timeout 0 --require ./node_modules/ts-node/register --exit --color ./lib/e2e/ibc.spec.ts",
"test:address": "NODE_ENV=test mocha --timeout 10000 --require ./node_modules/ts-node/register --exit --color 'lib/src/utils/address.spec.ts'",
"preget-proto": "rm -rf proto",
"get-proto": "COSMOS_REF=v0.43.0 ICS23_REF=v0.6.3 CHAIN_MAIN_REF=v2.1.1 COSMOS_IBC_REF=v1.0.0 ./lib/src/cosmos/v1beta1/scripts/get-proto.sh",
"predefine-proto": "./lib/src/cosmos/v1beta1/scripts/predefine-proto.sh",
Expand Down

0 comments on commit 39132fb

Please sign in to comment.