test: fix flaky E2E scenarios and stabilize test runner

This commit is contained in:
neon
2026-03-31 01:54:30 -06:00
parent 0c195165e6
commit 55df7fb817
2 changed files with 31 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
import path from 'path';
import { defineConfig } from 'vitest/config';
const e2eDatabaseUrl =
process.env.E2E_DATABASE_URL ?? 'postgres://projectx:projectx@localhost:5432/projectx_e2e';
export default defineConfig({
resolve: {
tsconfigPaths: true,
alias: {
'@projectx/types': path.resolve(__dirname, '../packages/types/src/index.ts'),
},
},
test: {
globals: true,
environment: 'node',
pool: 'forks',
include: ['test/**/*.e2e-spec.ts'],
passWithNoTests: true,
reporters: process.env.CI ? ['default', 'github-actions'] : ['default'],
env: {
DATABASE_URL: e2eDatabaseUrl,
},
},
});