prismock
prismock copied to clipboard
A mock for PrismaClient, dedicated to unit testing.
# 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...
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...
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?
https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#remarks-16
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) | [](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', } }, {...
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...