Skip to content

feat(tests): add API route integration tests with supertest (#289)#431

Open
Wisdom603 wants to merge 2 commits into
JosephOnuh:mainfrom
Wisdom603:issue/289-api-integration-tests
Open

feat(tests): add API route integration tests with supertest (#289)#431
Wisdom603 wants to merge 2 commits into
JosephOnuh:mainfrom
Wisdom603:issue/289-api-integration-tests

Conversation

@Wisdom603
Copy link
Copy Markdown

Closes #289

Changes

  • Expand supertest-app.ts to route health, circles CRUD, circle GET, join, leave, waitlist, and auth endpoints
  • Add seedContribution helper to test-db.ts
  • Write comprehensive integration tests covering all acceptance criteria
  • Update jest.config.js with projects config: integration tests run in node env, unit tests keep jsdom

Acceptance Criteria

  • ✅ All CRUD routes tested (create, read, update, delete)
  • ✅ Auth-protected routes tested with and without token
  • ✅ Test DB seeded and cleaned between tests
  • ✅ Tests run in CI (existing test job already has postgres+redis services)

Wisdom603 added 2 commits June 1, 2026 18:38
…uh#289)

- Expand supertest-app.ts to cover health, circles CRUD, circle GET,
  join, leave, waitlist, auth (send-otp, verify-otp, logout), profile
- Add seedContribution helper to test-db.ts
- Write comprehensive integration tests covering all acceptance criteria:
  all CRUD routes, auth-protected routes with/without token,
  DB seeded and cleaned between tests
- Update jest.config.js with projects config so integration tests run
  in node env and unit tests keep jsdom env
- CI already runs npm run test:coverage with postgres+redis services
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Wisdom603 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add API route integration tests with supertest

1 participant