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
test: add comprehensive unit tests for chain validation
Added 6 unit tests that verify chain validation logic without
requiring real RPC endpoints:
- test_validate_chain_id_success: Verifies matching chain IDs pass
- test_validate_chain_id_mismatch: Verifies mismatched IDs fail with clear error
- test_validate_chain_id_hex_variations: Tests different hex formats (0x1, 0x01, 0xa4b1)
- test_validate_chain_id_skips_non_evm: Ensures non-EVM chains are skipped
- test_validate_chain_id_invalid_hex: Tests graceful handling of malformed responses
- test_caip2_parsing: Verifies CAIP-2 parsing for both EVM and non-EVM chains
Implemented a MockTransport that simulates RPC responses, allowing
thorough testing of all validation paths without network dependencies.
All 20 oracle tests pass.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments