Skip to content

Open-house module has no unit tests: scheduling and RSVP logic is uncovered #1088

Description

@nanaf6203-bit

Open-house module has no unit tests: scheduling and RSVP logic is uncovered

Labels / Complexity: testing · Medium Complexity — Medium

Problem

src/open-house/ (6 files, 0 *.spec.ts anywhere) implements open-house scheduling and RSVP. None of the service logic — schedule validation, ownership checks, RSVP state transitions — is pinned by unit tests. A regression that lets an RSVP land on a cancelled event or a non-owner reschedule ships silently.

Why this is architecturally hard

  1. Ownership and state are the test design. The service enforces who can schedule and what states an event can move through; tests need fixtures for owner vs. non-owner actors and the event state machine.
  2. The service is Prisma-heavy. Tests follow the mock pattern in test/unit/ or the test-database harness; the contributor picks the existing convention.

Acceptance criteria

  • Unit tests cover scheduling validation, ownership enforcement, and RSVP state transitions (including cancellation).
  • Tests run in CI via npm test; the PR reports coverage via npm run test:cov.

Out of scope

Open-house e2e coverage (#117); behavior changes.

Getting started

  • src/open-house/open-house.service.ts — the logic to cover
  • test/unit/ — the mock-based pattern

Commands: npm test, npm run test:cov.

Good first files to read: src/open-house/open-house.service.ts, test/unit/search-facets.service.spec.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions