Skip to content
Dev.to1 min read

Mock What Prisma Returns, Not What Your API...

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: 'desc' } }; if (cursor) { args.skip = 1; args.c
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Get the 10 best reads every Sunday

Curated by AI, voted by readers. Free forever.

Liked this? Start your own feed.

0
0