import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    name: 'db',
    include: ['tests/**/*.test.ts'],
    // Schema pushed once by globalSetup before any tests.
    globalSetup: ['tests/global-setup.ts'],
    // All test files share one Postgres database. Running them in parallel
    // causes cross-file FK contention (e.g. one file's beforeEach clears Llm
    // while another file is mid-create). Per-test isolation still comes from
    // beforeEach; this just serializes files.
    fileParallelism: false,
  },
});
