mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
test: fix flaky E2E scenarios and stabilize test runner
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user