Skip to content

backend: add vitest tests for profile GET /me and PUT /me routes #3

@ShantKhatri

Description

@ShantKhatri

Summary

Add tests for the existing authenticated profile endpoints in apps/backend/src/routes/profiles.ts.

Tasks

  • create apps/backend/src/__tests__/profiles.test.ts.
  • mock app.prisma to return a fake user for GET /api/profiles/me and assert displayName etc.
  • mock app.prisma.user.update for PUT /api/profiles/me with valid input and assert body returned.
  • confirm failure path for invalid accentColor returns 400 and has validation error details.

Acceptance Criteria

  • asset test coverage for happy and invalid path.
  • pnpm --filter @devcard/backend test passes.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions