Problem
There are no tests verifying that the AnalyticsModule correctly fetches and parses the Total Value Locked (TVL) from the Soroban RPC.
Expected behavior
A new test file analytics.test.ts is created that mocks the Stellar RPC response and verifies that getTVL returns the correct human-readable decimal string.
Files to update
tests/analytics.test.ts (create)
Project relevance
Ensures that the primary metrics module functions correctly without requiring a live connection to the Stellar testnet during CI runs.
Acceptance criteria
Problem
There are no tests verifying that the
AnalyticsModulecorrectly fetches and parses the Total Value Locked (TVL) from the Soroban RPC.Expected behavior
A new test file
analytics.test.tsis created that mocks the Stellar RPC response and verifies thatgetTVLreturns the correct human-readable decimal string.Files to update
tests/analytics.test.ts(create)Project relevance
Ensures that the primary metrics module functions correctly without requiring a live connection to the Stellar testnet during CI runs.
Acceptance criteria
this.client.rpcServer.simulateTransactionis mocked using Jest to return a mock XDR payload