import { loadEnv } from 'vite'
import { defineConfig } from 'vitest/config'

Object.assign(process.env, loadEnv('test', process.cwd(), ''))

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',
    include: ['src/tests/integration/**/*.test.ts'],
    setupFiles: ['src/tests/setup.ts'],
    testTimeout: 30000,
    hookTimeout: 30000,
    pool: 'forks',
    poolOptions: { forks: { singleFork: true } },
  },
})
