import { afterEach, beforeAll, vi } from "vitest"

beforeAll(() => {
  process.env.SKIP_ENV_VALIDATION = "1"
  process.env.NEXTAUTH_SECRET = process.env.NEXTAUTH_SECRET ?? "test-nextauth-secret"
  process.env.NEXTAUTH_URL = process.env.NEXTAUTH_URL ?? "http://127.0.0.1:3000"
  process.env.DATABASE_URL = process.env.DATABASE_URL ?? "mysql://test:test@127.0.0.1:3306/test_db"
})

afterEach(() => {
  vi.clearAllMocks()
})
