import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    environment: 'node',
    globals: false,
    include: ['src/**/__tests__/**/*.test.ts'],
    // DB-integration suites (checkpoints, claude-session-store, reconnect, etc.)
    // each apply the full schema in beforeAll against the one shared dev DB; running
    // test files in parallel makes those concurrent DDL applies deadlock under
    // DATABASE_URL. Serialize file execution — the suites are fast, so the cost is
    // negligible and the default (no-DATABASE_URL) run is unaffected.
    fileParallelism: false,
  },
});
