@mayflower-fi/test-against-rpc
v0.0.1
Published
This test suite verifies that the May SDK can properly decode data from the on-chain program. It ensures that the SDK's data structures match the actual on-chain program data structures.
Readme
Test Against RPC
This test suite verifies that the May SDK can properly decode data from the on-chain program. It ensures that the SDK's data structures match the actual on-chain program data structures.
What it tests
The tests fetch real data from the RPC and verify that:
- Tenants can be decoded correctly
- Market metadata can be decoded correctly
- Market groups can be decoded correctly
- Markets (specifically linear markets) can be decoded correctly
- Personal positions can be decoded correctly
Why this matters
This test suite acts as a compatibility check between the SDK and the on-chain program. If the on-chain program's data structures change but the SDK isn't updated accordingly, these tests will fail, alerting us to any structural mismatches.
Running the tests
npm testThe tests require environment configuration for RPC endpoints and specific account addresses to test against.
