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
Running pnpm dev shows that runtimeconfig public.hello is initialized by the .ENV file
Running pnpm test shows that runtimeconfig public.hello is empty
Describe the bug
When running pnpm dev the .ENV file's content is being applied, and calling useRuntimeConfig() results values which are initialized based on the content of the .ENV file
However when running vitest, .ENV file is not applied, and runtimeconfig values are not initialized with it.
What is the designated way to influence the environment variables while running tests?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Working directory: /home/projects/nuxt-vitest-pvfdx1 3:18:25 PM
Nuxt project info: 3:18:25 PM
Reproduction
See repo:
https://stackblitz.com/edit/nuxt-vitest-pvfdx1
Running
pnpm dev
shows that runtimeconfigpublic.hello
is initialized by the .ENV fileRunning
pnpm test
shows that runtimeconfigpublic.hello
is emptyDescribe the bug
When running
pnpm dev
the.ENV
file's content is being applied, and callinguseRuntimeConfig()
results values which are initialized based on the content of the.ENV
fileHowever when running vitest,
.ENV
file is not applied, and runtimeconfig values are not initialized with it.What is the designated way to influence the environment variables while running tests?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: