Skip to content

Integration test: indexer against a Postgres fixture #13

Description

@iexwr

Context

The indexer has no automated test, so regressions in event mapping go unnoticed.

Acceptance criteria

  • Add a vitest suite that spins up Postgres (testcontainers or a docker-compose service in CI), seeds a Cursor, feeds a fixture Soroban event, and asserts the resulting PaymentRequest row.
  • Runs in CI (extend .github/workflows/ci.yml with a Postgres service).

Technical notes

  • Extract the mapping logic into a pure function applyEvent(event) -> Prisma.Write so it is testable without a live RPC.

Testing

  • New test file src/indexer.test.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveStellar Wave for StackPayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions