Recently, I've been experimenting with NestJS and integrating it with Prisma 2. One particular challenge I'm facing revolves around testing. All my failed tests seem to be related to the entity object not being recognized in the PrismaService. Each failed test follows a similar pattern, like this one below but potentially involving a different entity type:
src/user/user.service.ts:25:24 - error TS2339: Property 'user' does not exist on type 'PrismaService'.
25 return this.prisma.user.findUnique({ where: userWhereUniqueInput });
These tests are standard ones generated by the Nest CLI for resources. My PrismaService is essentially a class that extends PrismaClient and overrides certain methods such as the shutdown hook method and init/destroy lifecycle methods, similar to what nestJS demonstrates in their Prisma 2 example. Could this issue be attributed to a module import/export discrepancy or perhaps a compatibility conflict between prisma/nestjs/jest? All my modules are correctly importing required dependencies and exporting services/providers, so I am puzzled as to what could be causing this issue unless some pre-testing setup is necessary.