Getting ReferenceError: exports is not defined
on my src/setupTests.ts while trying to convert from CRA to Vite
#38
Unanswered
anthonyyoussef01
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was facing a few errors in the beginning that I solved with the following:
export default {
in jest.config.ts was changed tomodule.exports = {
preset: 'ts-jest',
in jest.config.ts was changed topreset: 'ts-jest/presets/default-esm'
"test": "jest --config jest.config.js",
in package.json was changed to"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest --config jest.config.js",
Now I have the following error and cannot find any solution:
Beta Was this translation helpful? Give feedback.
All reactions