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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions