// Set env vars before any app code is imported process.env.DATABASE_URL = "postgresql://fedjens@localhost:5432/eyrun_test"; process.env.JWT_SECRET = "test-secret-that-is-at-least-32-characters-long"; process.env.PORT = "0"; process.env.HOST = "127.0.0.1"; process.env.RESEND_API_KEY = "re_test_fake_key"; // Mock Resend so tests don't send real emails import { vi } from "vitest"; vi.mock("resend", () => ({ Resend: class { emails = { send: vi.fn().mockResolvedValue({ data: { id: "test" }, error: null }), }; }, }));