import { describe, it, expect } from "vitest"; import { readFileSync, existsSync } from "fs"; import { join } from "path"; describe("Dead Signup Router Removal", () => { describe("Signup router module removed", () => { it("should not have src/routes/signup.ts file", () => { const signupPath = join(__dirname, "../routes/signup.ts"); expect(existsSync(signupPath)).toBe(false); }); }); describe("Dead verification functions removed from source", () => { it("should not export isEmailVerified from verification.ts source", () => { const src = readFileSync(join(__dirname, "../services/verification.ts"), "utf8"); expect(src).not.toContain("export async function isEmailVerified"); }); it("should not export getVerifiedApiKey from verification.ts source", () => { const src = readFileSync(join(__dirname, "../services/verification.ts"), "utf8"); expect(src).not.toContain("export async function getVerifiedApiKey"); }); it("should still export createPendingVerification", () => { const src = readFileSync(join(__dirname, "../services/verification.ts"), "utf8"); expect(src).toContain("export async function createPendingVerification"); }); it("should still export verifyCode", () => { const src = readFileSync(join(__dirname, "../services/verification.ts"), "utf8"); expect(src).toContain("export async function verifyCode"); }); }); describe("410 signup handler still works", () => { it("should still have signup 410 handler working", async () => { const request = (await import("supertest")).default; const { app } = await import("../index.js"); const res = await request(app).post("/v1/signup/free"); expect(res.status).toBe(410); expect(res.body.error).toContain("discontinued"); }); }); });