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.
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 hoistedvi.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 hoistedvi.mock()+ repeated mocks is copied across ~30 route test files. Extracting shared test helpers would reduce maintenance burden.