It looks like vite-jest is not able to correctly handle accessing import.meta.env in components. I cloned the react-app-ts example and tried to use an env variable. However, I ended up with the "Invalid hook call" error.
Without import.meta.env, the tests passed successfully. Considering the fact that Vite is using import.meta for a few things, I think it would be great if vite-jest was able to process it.
It looks like vite-jest is not able to correctly handle accessing
import.meta.env
in components. I cloned the react-app-ts example and tried to use an env variable. However, I ended up with the "Invalid hook call" error.Without
import.meta.env
, the tests passed successfully. Considering the fact that Vite is using import.meta for a few things, I think it would be great if vite-jest was able to process it.