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
I'm using this package in my Jest setup in a Vite project.
With es modules env variables are accessed through import.meta.env. When I run my Jest tests, any that import a module that involves accessing an env variable results in the following error:
TypeError: Cannot read property 'VITE_MY_ENV_VAR' of undefined
Suggesting that import.meta.env is undefined; although import.meta looks to be defined or the error would say so.
Any idea how to solve this?
The text was updated successfully, but these errors were encountered:
I'm using this package in my Jest setup in a Vite project.
With es modules env variables are accessed through
import.meta.env
. When I run my Jest tests, any that import a module that involves accessing an env variable results in the following error:Suggesting that
import.meta.env
is undefined; althoughimport.meta
looks to be defined or the error would say so.Any idea how to solve this?
The text was updated successfully, but these errors were encountered: