Overview
SDK method return shapes are tested implicitly by unit tests but never asserted against a locked snapshot. Add snapshot tests so any accidental breaking change to a returned object's shape fails CI immediately.
Acceptance Criteria
- Snapshot tests using Vitest's
toMatchSnapshot() for all read methods: getInvoice, getLeaderboard, getInvoiceHistory, getInvoiceExt, getStats
- Snapshots stored in
tests/snapshots/ directory and committed to the repo
- Snapshots use deterministic fixture data (no timestamps or ledger sequences that change)
bigint fields serialized as strings in snapshots (Jest/Vitest snapshot format)
- Snapshot update command:
vitest run --update-snapshots (documented in CONTRIBUTING.md)
- CI fails if any snapshot diverges without an explicit update commit
- Snapshot diff shown in PR comment when snapshots change (via GitHub Actions)
Overview
SDK method return shapes are tested implicitly by unit tests but never asserted against a locked snapshot. Add snapshot tests so any accidental breaking change to a returned object's shape fails CI immediately.
Acceptance Criteria
toMatchSnapshot()for all read methods:getInvoice,getLeaderboard,getInvoiceHistory,getInvoiceExt,getStatstests/snapshots/directory and committed to the repobigintfields serialized as strings in snapshots (Jest/Vitest snapshot format)vitest run --update-snapshots(documented in CONTRIBUTING.md)