diff --git a/vitest.config.ts b/vitest.config.ts index 77cab64..28db09c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,6 +7,12 @@ export default defineConfig({ test: { globals: true, environment: "node", + env: { + // Tests run from the host machine, so use localhost instead of Docker service name + DATABASE_URL: + process.env.DATABASE_URL_LOCAL || + "postgresql://netforge:netforge_dev@localhost:5432/netforge_dev", + }, }, resolve: { alias: {