test-utils
test-utils copied to clipboard
Installed Nuxt as stated in the documentation but issue with jest-preset.js
After installing and setting up nuxt test utils as stated in the docs, I get an error saying 'Module @nuxt/test-utils should have "jest-preset.js" or "jest-preset.json" file at the root.' when I run yarn test
I have the same issue with the following dependency versions:
- @nuxt/test-utils: 3.0.0-rc.5
- jest: 28.1.3
- nuxt: 3.0.0-rc.5
I had the same problem. You need to downgrade to "@nuxt/test-utils": "0.2.2". And it works.
I had the same problem. You need to downgrade to "@nuxt/test-utils": "0.2.2". And it works.
Tried your solution but having a different error of:
$ jest
[fatal] You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules
...
[fatal] Cannot read properties of undefined (reading 'close')
...
Yup, I can confirm this being the case for me as well.