Veve

Env

How to load environment variables inside testing files?

Veve provides a way to load specific environment variables into the global process.env context so they are easily accessible. This is achieved by utilizing the dotenv package.

For example, you can structure your project like this:

.env.local
veve.config.ts
veve.config.ts
import veve, { spec } from "veve";
 
export default veve({
  envs: ['.env.local']  // Load env variables from .env.local
});

On this page

No Headings