()
| 12 | // globalSetup runs in the parent process before vitest workers start, |
| 13 | // so vitest's `env` config is not applied — set defaults explicitly. |
| 14 | function setEnvDefaults() { |
| 15 | process.env.DATABASE_URL ??= |
| 16 | 'postgresql://postgres:postgres@localhost:5432/postgres?schema=public'; |
| 17 | process.env.CLICKHOUSE_URL ??= 'http://localhost:8123/openpanel'; |
| 18 | } |
| 19 | |
| 20 | export async function setup() { |
| 21 | setEnvDefaults(); |