> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# env

- **Type:** `Partial<NodeJS.ProcessEnv>`
- **Default:** `undefined`

Custom environment variables available on `process.env` during tests.

```ts title="rstest.config.ts"
import { defineConfig } from '@rstest/core';

export default defineConfig({
  env: {
    PRINT_LOGGER: 'true',
  },
});
```

After setting the above configuration, you can access the `PRINT_LOGGER` variable in your tests:

```ts title="index.test.ts"
import { describe, it } from '@rstest/core';

if (process.env.PRINT_LOGGER === 'true') {
  console.log('PRINT_LOGGER is enabled');
}
```
