Skip to content

Integration tests: DB CRUD, auth flow, event handler #115

Description

@BillyOutlast

Blocked by infrastructure

Plan: .opencode/plans/code-quality-cleanup.md Phase 2.2-2.4

What's needed

  1. DB CRUD tests (3-5 tests) — needs DATABASE_URL pointing to test DB. Helper exists at server/test/utils/db.ts (transaction-per-test).
  2. Auth flow tests (3-5 tests) — needs OIDC fixture setup. MSW OIDC mocks exist at server/test/mocks/oidc.ts.
  3. Event handler tests (3-5 tests) — needs WebSocket/SSE test infrastructure. No existing helpers.

Unblocking steps

  • For DB: set up a test database and configure DATABASE_URL in vitest environment
  • For auth: create reusable OIDC mock fixtures (token generation, callback handling)
  • For events: evaluate ws library test helpers or msw WebSocket interceptor

Coverage target: 1.17% → 3-5% after these tests land.

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredWork intentionally deferred to a future session — see linked PR or commit for contextenhancementNew feature or requestgood first issueGood for newcomerstypescript

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions