Add comprehensive tests, improve API docs, and reconcile types - #200
Merged
meshackyaro merged 2 commits intoAug 31, 2026
Conversation
…rustflow-protocol#118: Add comprehensive tests and improve documentation ## Changes ### trustflow-protocol#116: Expand SimpleCache unit tests - Added comprehensive tests covering TTL expiry logic with fake timers - Tests for default vs custom TTL behavior - Tests for size(), delete(), clear() methods - Edge case tests including expiry at boundary and re-setting expired keys - Generic type handling tests - LazyEviction on get tests ### trustflow-protocol#117: Zod schemas already have comprehensive unit tests - Confirmed tests/schemas.test.ts covers all 8 schemas with edge cases - Tests validate address formats, positive amounts, network enums, URL validation ### trustflow-protocol#113: Expand docs/API.md to document previously undocumented modules - Added comprehensive TrustFlowClient documentation with constructor, methods, and examples - Added MultiSigEscrowClient documentation with flow, methods, and real-world examples - Added wallet module documentation (connectWallet, getFreighter, getAlbedo, isFreighterInstalled) - Added event parsing utilities documentation (parseEvent, parseEvents, isTrustFlowEvent) - Improved Zod schemas documentation section ### trustflow-protocol#118: Resolve ClientConfig/Network type collision between schemas.ts and types.ts - Updated ClientConfigSchema in schemas.ts to match actual SDK usage: - Replaced 'horizonUrl' with 'apiBaseUrl' and 'apiKey' fields - Now matches the ClientConfig interface in types.ts - Updated NetworkSchema to remove 'FUTURENET' (not actually supported by SDK): - Only supports 'MAINNET' and 'TESTNET' as per types.ts - Aligns with HORIZON_URLS and SOROBAN_RPC_URLS in constants.ts - Updated schema tests to reflect the schema changes - Schemas and types are now compatible and ready to be exported alongside each other
|
@girly-coder01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses four related issues involving tests, documentation, and type safety:
Test plan
npm testto verify all test suites pass