What
No reusable mock exists for the Stellar RPC client. Each test file would need to create its own mocks.
Why
A shared mock ensures consistent behavior across tests and reduces boilerplate.
Scope
- Create a mock Stellar RPC server class
- Implement
getAccount, sendTransaction, getTransaction, simulateTransaction, prepareTransaction
- Support configurable responses and errors
- Export for use in all test files
Acceptance Criteria
Technical Context
src/lib/stellar.ts:15-18 — rpcServer singleton
- Methods used:
getAccount, sendTransaction, getTransaction, simulateTransaction, prepareTransaction
- Could use
jest.mock() or a manual mock class
What
No reusable mock exists for the Stellar RPC client. Each test file would need to create its own mocks.
Why
A shared mock ensures consistent behavior across tests and reduces boilerplate.
Scope
getAccount,sendTransaction,getTransaction,simulateTransaction,prepareTransactionAcceptance Criteria
MockRpcServeror similarTechnical Context
src/lib/stellar.ts:15-18—rpcServersingletongetAccount,sendTransaction,getTransaction,simulateTransaction,prepareTransactionjest.mock()or a manual mock class