Skip to content

Fleet of similar test structures: duplicate setup in route tests #547

Description

@itsmiso-ai

Parent umbrella issue: #495
Source audit: Weekly tech debt audit: dispatch - 2026-07-01
Source audit date: 2026-07-01

Original recommendation

Fleet of similar test structures: duplicate setup in route tests

Evidence: Multiple route test files duplicate the mock setup for prisma, authorizeRequest, and GitHub API calls. The pattern of hoisted vi.mock() + repeated mocks is copied across ~30 route test files. Extracting shared test helpers would reduce maintenance burden.


Matched top finding

Evidence: Multiple route test files duplicate the mock setup for prisma, authorizeRequest, and GitHub API calls. The pattern of hoisted vi.mock() + repeated mocks is copied across ~30 route test files. Extracting shared test helpers would reduce maintenance burden.


Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit, review, or investigation work.priority/p3Low priority.status/backlogNot ready for worker pickup yet.

    Type

    No type

    Fields

    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