19 lines
690 B
TypeScript
19 lines
690 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
globals: false,
|
|
// Test files share one DB name (quinn_my_test) and each DROP/CREATEs it in
|
|
// beforeAll; running them in parallel races on pg_database. Serialize files.
|
|
fileParallelism: false,
|
|
setupFiles: ['./src/__tests__/setup.ts'],
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
QUINN_MY_TEST_DB_URL: process.env.QUINN_MY_TEST_DB_URL ?? 'postgres://quinn:quinn@localhost:25435/quinn_my_test',
|
|
PROTECT_ORIGINALS_DIR: '/tmp/test-my-originals',
|
|
PHOTOS_PUBLIC_DIR: '/tmp/test-my-photos-public',
|
|
CSS_TRAPS_JSON: '/dev/null',
|
|
},
|
|
},
|
|
});
|