You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ReferenceError: /Users/myname/w/myrepo/setup-prisma.js: The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables.
Invalid variable access: jestPrisma
When you mock a module this call is hoisted which means that locally declared variables might not be available inside the mock. However, when you a variable name starts with mock then jest allows it.
In the documentation it says
When running
npm test
it says:jest.config.js
looks like:It seems there is a problem setting up
jestPrisma
to be accessible from the 'setup.prisma.js' file?I tried adding
const { jestPrisma } = require('@quramy/jest-prisma');
to the top of 'setup.prisma.js' and it still gave the same error.The text was updated successfully, but these errors were encountered: