You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No integration tests exist for the server API. Unit tests for individual services are insufficient to catch issues in how routes, middleware, database queries, and external service calls interact. A full integration test suite using a real test database and mocked external services is required.
Acceptance Criteria
Vitest (or Jest) is configured in server/ with a test script in package.json.
A test database is provisioned and migrated before the suite runs; it is torn down afterwards. Tests use isolated transactions that are rolled back after each test case.
The following route groups each have an integration test file: auth, trades, wallet, profile, webhooks, admin.
External HTTP calls (Termii, Paystack, Stellar/Horizon) are mocked using msw or nock.
Each test file covers: successful request (2xx), validation failure (422), auth failure (401/403), and not-found (404) scenarios.
Code coverage is reported and a minimum of 80% line coverage is enforced as a CI gate.
Location:
server/src/__tests__/Description
No integration tests exist for the server API. Unit tests for individual services are insufficient to catch issues in how routes, middleware, database queries, and external service calls interact. A full integration test suite using a real test database and mocked external services is required.
Acceptance Criteria
server/with atestscript inpackage.json.auth,trades,wallet,profile,webhooks,admin.mswornock.