This documentation covers Vitest v4 (old version). For the latest version, see https://vitest.dev.

Skip to content

env ​

  • Type: Partial<NodeJS.ProcessEnv>

Environment variables available on process.env and import.meta.env during tests. These variables will not be available in the main process (in globalSetup, for example).