Summary
Deposit and withdraw are the most financially sensitive flows but only have unit-level coverage. Full integration tests against a real Postgres + mocked Stellar RPC would catch regressions that unit tests miss.
Scope
- Seed test database with a funded user and custodial wallet
POST /api/deposit: verify Transaction record, position update, event cursor advance
POST /api/withdraw: verify balance deduction, transaction record, DLQ on RPC failure
- Assert correct HTTP status, response shape, and database state after each operation
Acceptance Criteria
Summary
Deposit and withdraw are the most financially sensitive flows but only have unit-level coverage. Full integration tests against a real Postgres + mocked Stellar RPC would catch regressions that unit tests miss.
Scope
POST /api/deposit: verify Transaction record, position update, event cursor advancePOST /api/withdraw: verify balance deduction, transaction record, DLQ on RPC failureAcceptance Criteria
jest.mocknode-ci.ymlworkflow