import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    environment: 'node',
    globals: true,
    setupFiles: ['./test/setup.ts'],
    // Disable parallel file execution so concurrent DB tests do not interfere
    // via the shared MariaDB. The global afterEach in test/setup.ts truncates
    // list tables; running test files in parallel causes FK violations when one
    // file's afterEach deletes rows that another file's test is still using.
    fileParallelism: false,
  },
});
