● Test suite failed to run
Module "fs" has been externalized for browser compatibility and cannot be accessed in client code.
at Object.get (node_modules/.vite-jest-cache/__slash__@id__slash____vite-browser-external__colon__fs.js:3:11)
at src/components/__tests__/HelloWorld.spec.ts?1639665446845:3:24
at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
at runJest (node_modules/@jest/core/build/runJest.js:404:19)
Hi there,
I'm trying to test in
jest-environment-node
and getting some errors.In your
examples/vue-app-ts
, I didyarn add jest-environment-node -D
jest-environment-node
astestEnvironment
injest.config.js
HelloWorld.spec.ts
to the following:Then I get this error when running the test:
Do I need to do something in the
vite.config.ts
?