How to test Prisma ORM model file without actually calling real database

I needed to test my model file and want to remove prisma from the equation. How could I basically mock my prisma findMany calls to return any dummy data and just check the functionality of my file using Jest https://vlc.onl.

Basically the thing needed to be mocked is :- prisma.tablename.findMany(query)

Thanks in advance

I’ve never used Prisma so I can’t say, but here’s what came up from googling:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.