I have a mock created like the following: ```impo...
# prisma-client
k
I have a mock created like the following:
Copy code
import { PrismaClient } from "@prisma/client";
import { mockDeep, mockReset, DeepMockProxy } from "jest-mock-extended";
import { PrismaService } from "@services/prisma.service";

jest.mock("@services/prisma.service", () => ({
    __esModule: true,
    PrismaService: mockDeep<PrismaClient>(),
}));

beforeEach(() => {
    mockReset(PrismaMock);
});

export const PrismaMock = PrismaService as unknown as DeepMockProxy<PrismaClient>;
and then in my test i am using it... However its still connecting to the live (local) db.
Copy code
PrismaMock.nft_collection.create.mockResolvedValueOnce({});

const [response, error] = await CreateCollection(payload);
Not sure whats going on, why Prisma is not being mocked?
1
i solved it, need to make sure the import of
PrismaMock
is above the import of
CreateCollection