Skip to content

test: add HTTP-layer route tests for Fastify API using fastify.inject - #246

Merged
collinsezedike merged 1 commit into
mainfrom
test/api-http-layer-routes
Jun 25, 2026
Merged

test: add HTTP-layer route tests for Fastify API using fastify.inject#246
collinsezedike merged 1 commit into
mainfrom
test/api-http-layer-routes

Conversation

@collinsezedike

@collinsezedike collinsezedike commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds apps/api/src/__tests__/routes.test.ts with 20 tests covering all Fastify route groups via fastify.inject, so no live RPC endpoint is needed
  • Mocks @meridian/stellar-sdk-helpers at the module level; all tests run in isolation with controlled SDK responses
  • Coverage: GET /health, GET /positions/:publicKey (200/400/503), POST /tx/deposit (200/400/500), POST /tx/withdraw (200/400/500), POST /tx/add-trustline (200/400), POST /tx/submit (200/400), GET /vaults (200/500), GET /vaults/:vaultId (200/404)

Test plan

  • pnpm lint && pnpm typecheck && pnpm test pass locally
  • pnpm --filter @meridian/api run test shows 20 passing
  • No live RPC calls made during test run (confirmed by mocking @meridian/stellar-sdk-helpers)

Closes #238

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meridian Ready Ready Preview, Comment Jun 24, 2026 3:30pm

@collinsezedike
collinsezedike merged commit 98d8cef into main Jun 25, 2026
5 checks passed
@collinsezedike
collinsezedike deleted the test/api-http-layer-routes branch June 25, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test] Add HTTP-layer test coverage for Fastify routes in apps/api

1 participant