Mock What Prisma Returns, Not What Your API Returns
typescript
dev.to
I'm building RunHop in public — a social + event platform for running races, built on NestJS. Today I finished the organization and membership e2e test suites. Along the way, I spent an embarrassing amount of time on a TypeError that came down to one wrong mock. The Crash // organization.service.ts async list(cursor?: string, take: number = 20) { const args: Prisma.OrganizationFindManyArgs = { take, where: { deletedAt: null }, orderBy: { createdAt: 'de