Skip to content

Commit b75f91d

Browse files
committed
docs: remove outdated statement
1 parent ba1e733 commit b75f91d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

docs/api/vi.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,6 @@ import.meta.env.MODE = 'test'
433433
```
434434
:::
435435

436-
:::warning
437-
Vitest transforms all `import.meta.env` calls into `process.env`, so they can be easily changed at runtime. Node.js only supports string values as env parameters, while Vite supports several built-in envs as boolean (namely, `SSR`, `DEV`, `PROD`). To mimic Vite, set "truthy" values as env: `''` instead of `false`, and `'1'` instead of `true`.
438-
439-
But beware that you cannot rely on `import.meta.env.DEV === false` in this case. Use `!import.meta.env.DEV`. This also affects simple assigning, not just `vi.stubEnv` method.
440-
:::
441-
442436
## vi.unstubAllEnvs
443437

444438
- **Type:** `() => Vitest`

0 commit comments

Comments
 (0)