Description: Implement a robust HTTP mocking layer intercepting outbound requests from the @stellar/stellar-sdk to the Horizon RPC.
Context / Motivation: Running backend tests shouldn't require an active internet connection or rely on the rate-limited public testnet Horizon nodes. Offline mocking ensures our CI pipelines run blazingly fast and predictably.
Acceptance Criteria: - [ ] Integrate a mocking library like nock or msw (Mock Service Worker).
Description: Implement a robust HTTP mocking layer intercepting outbound requests from the
@stellar/stellar-sdkto the Horizon RPC.Context / Motivation: Running backend tests shouldn't require an active internet connection or rely on the rate-limited public testnet Horizon nodes. Offline mocking ensures our CI pipelines run blazingly fast and predictably.
Acceptance Criteria: - [ ] Integrate a mocking library like
nockormsw(Mock Service Worker).504 Gateway Timeoutfrom Horizon gracefully.Technical Pointers: The Stellar SDK relies heavily on standard HTTP requests under the hood. You will need to explicitly mock the exact URL paths (e.g.,
https://horizon-testnet.stellar.org/accounts/...) that the server utilizes.