import { describe, expect, it } from "vitest";
import { GET } from "./+server";

describe("GET /healthz", () => {
  it("returns 200 with status ok", async () => {
    const response = await GET({} as any);

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

  it("returns JSON content type", async () => {
    const response = await GET({} as any);

    expect(response.headers.get("Content-Type")).toBe("application/json");
  });
});
