aegida-console / app / api / health / route.test.ts
route.test.ts
Raw
// @vitest-environment node

import { describe, expect, it } from "vitest";

import { GET } from "@/app/api/health/route";

describe("GET /api/health", () => {
  it("reports success when the application process accepts requests", async () => {
    const response = await GET();

    expect(response.status).toBe(200);
    expect(await response.json()).toEqual({ status: "ok" });
  });
});