intake-cohort.service.ts · PR #870 · Branch EC-1812_vitest-stryker-spike
Prisma include: { … } / select: { … } shape objects (e.g. replacing
{ select: { id: true, name: true, type: true } } with {} or flipping a boolean field).
These survive because the tests mock PrismaClient — the mock returns a
pre-canned object regardless of what fields were passed in the include clause, so
mutating the query shape doesn't change test output.
This is a known, benign limitation of unit-test mocking for Prisma: the real field selection
is validated by integration/E2E tests against a live DB. No business logic is uncovered.