prismock icon indicating copy to clipboard operation
prismock copied to clipboard

A mock for PrismaClient, dedicated to unit testing.

Results 33 prismock issues
Sort by recently updated
recently updated
newest added

# Problem This type cast is incorrect: https://github.com/morintd/prismock/blob/1b3baeb75b4749cedd0482479a178e39a1f37a2b/src/lib/client.ts#L116 It's intersecting the `PrismockData` interface as a _static_ interface, not an instance interface. What I mean by that is that with the...

enhancement

My API supports pagination. In DB query the primary key 'ID' is used as cursor to get the next set of values after the nextToken ID. Its working fine in...

enhancement
help wanted

Hey, this test is actually falling, I tried my hardest to make it work but I don't understand fully the codebase. ```txt find › findFirst › Should not return item...

Hello, I am using the following schema for users in my app, ``` model User { id Int @id @default(autoincrement()) ... // Friends // If a User is in requested...

This is more of a question. I use client extensions (https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions) pretty heavily in my code. I can mock and recreate those on my own but does Prismock support them?

enhancement
help wanted

https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#remarks-16

enhancement
help wanted

This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@prisma/client](https://www.prisma.io) ([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/client)) | [`5.17.0` -> `5.20.0`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.17.0/5.20.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |...

I have a query like this: ```typescript const result = await prismaClient.user.findFirst({ select: { id: true, name: true, manyToManyTable: { select: { otherRelation: { select: { id: true, name: true,...

We have a function that includes an `OR` matching, like the following: ```ts prismaClient.model.findMany({ where: { AND: [{ OR: [ { field: { contains: 'value', mode: 'insensitive', } }, {...

bug
invalid
question

My query has orderBy a descending date but it doesn't seem like it work. I did some integration test and confirmed my query is correct so I think it's the...