You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: CosmosValidator has no unit tests; the valid path is never reached by vitest #2
Coverage shows cosmos.ts:21, the success return, as never executed. Cosmos is only exercised by scripts/test-differential.mjs, which isn't part of npm test or test:coverage. Untested areas:
each chain's HRP (osmo, inj, etc.) being rejected by the other chains
the length policy: 32-byte accounts allowed on cosmos/osmosis/sei, rejected on injective/celestia
Bech32m rejection, non-zero padding, and the cosmosvaloper/valcons/pub prefixes
Proposed fix (PR to follow): added tests/cosmos.test.ts with 15 cases.
Confirmed on main. The Vitest coverage run passes all 220 tests, but it never reaches the successful return in CosmosValidator. The separate differential suite already checks valid accounts for all five chains and the per-chain length rules.
I’d prioritize a small table-driven unit test for the public result on each chain, plus cross-chain prefix rejection and the 32-byte distinction for Injective and Celestia. That gives contributors running npm test an immediate signal if a supported account format breaks.
Activity
Dhananjay-alt commentedon Nov 21, 2026
Fixed in #10.
Added tests/cosmos.test.ts covering every Cosmos chain prefix, the 20/32-byte length rules, Bech32m, padding and operator/consensus prefixes (commit f0962c9).
Samarth208P commentedon Nov 21, 2026
Confirmed on
main. The Vitest coverage run passes all 220 tests, but it never reaches the successful return inCosmosValidator. The separate differential suite already checks valid accounts for all five chains and the per-chain length rules.I’d prioritize a small table-driven unit test for the public result on each chain, plus cross-chain prefix rejection and the 32-byte distinction for Injective and Celestia. That gives contributors running
npm testan immediate signal if a supported account format breaks.test: add table-driven Cosmos account tests (Samarth208P#14)