13 lines
477 B
TypeScript
13 lines
477 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { GET } from "./route";
|
|
import { CERTSCOPE_VERSION } from "@/lib/version";
|
|
|
|
describe("GET /api/health", () => {
|
|
it("returns a cache-free versioned liveness response", async () => {
|
|
const response = GET();
|
|
expect(response.status).toBe(200);
|
|
expect(response.headers.get("cache-control")).toBe("no-store");
|
|
expect(await response.json()).toMatchObject({ status: "ok", version: CERTSCOPE_VERSION });
|
|
});
|
|
});
|