import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    environment: 'node',
    include: ['tests/**/*.test.ts'],
    // Set here so a developer's local .env (loaded by dotenv, which never overrides) can't change test results.
    env: {
      NODE_ENV: 'test',
      R2_ACCOUNT_ID: '',
      R2_ACCESS_KEY_ID: '',
      R2_SECRET_ACCESS_KEY: '',
      R2_BUCKET: '',
      R2_PUBLIC_URL: '',
      SMTP_HOST: '',
      COOKIE_DOMAIN: '',
      WEBSITE_DIST: '/nonexistent-website-build', // API-only in tests (website SSR has its own test)
    },
  },
});
