Skip to content

test: add integration tests for core server workflows#36

Merged
Many0nne merged 1 commit into
mainfrom
feat/issue-28-integration-tests
Mar 13, 2026
Merged

test: add integration tests for core server workflows#36
Many0nne merged 1 commit into
mainfrom
feat/issue-28-integration-tests

Conversation

@Many0nne
Copy link
Copy Markdown
Owner

Summary

  • Install supertest as dev dependency
  • Add tests/fixtures/types/user.ts fixture interface with // @endpoint
  • Add tests/integration/server.integration.test.ts with 8 integration tests covering the full request lifecycle

Tests added

  • GET /health → 200 with status/uptime/cache fields
  • GET /api/users → 200 array with User shape (id, name, email)
  • GET /api/users?pageSize=3 → respects pagination
  • GET /api/users?page=abc → 400 on invalid params
  • GET /api/users/1 → 200 single object
  • GET /api/unknownresource → 404 with error field
  • x-mock-status: 503 header → forces 503 response

Total tests: 171 existing + 8 new = 179 passing

Closes #28

🤖 Generated with Claude Code

Install supertest, add a User fixture interface, and create
tests/integration/server.integration.test.ts covering:
- GET /health → 200 with cache stats
- GET /api/users → 200 array with User shape
- GET /api/users?pageSize=3 → respects pagination
- GET /api/users?page=abc → 400 on invalid params
- GET /api/users/1 → 200 single object
- GET /api/unknownresource → 404
- x-mock-status: 503 header → forced 503

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Many0nne Many0nne merged commit 9c45231 into main Mar 13, 2026
2 checks passed
@Many0nne Many0nne deleted the feat/issue-28-integration-tests branch March 13, 2026 21:33
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.

Testing: add integration tests for core server workflows

1 participant