We had a bunch of the following warnings when tests were starting up:
If you want to access Prisma client in beforeAll or afterAll, use jestPrisma.originalClient.
jsetPrisma.client should be used in test or beforeEach functions because transaction has not yet started.
The culprit was the ES Module system that asks for a property called __esModule on the proxied instance every time we import the module.
The changes in this PR are the following:
Only show the warning if the property name is not __esModule.
Fix the spelling in the warning from jsetPrisma to jestPrisma.
We had a bunch of the following warnings when tests were starting up:
The culprit was the ES Module system that asks for a property called
__esModule
on the proxied instance every time we import the module.The changes in this PR are the following:
__esModule
.jsetPrisma
tojestPrisma
.