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

import { healthResponseSchema } from "./health";

describe("healthResponseSchema", () => {
  it("accepts a valid liveness response", () => {
    const result = healthResponseSchema.safeParse({
      status: "ok",
      service: "api",
      timestamp: new Date().toISOString(),
    });
    expect(result.success).toBe(true);
  });

  it("rejects invalid status values", () => {
    const result = healthResponseSchema.safeParse({
      status: "unknown",
      service: "api",
      timestamp: new Date().toISOString(),
    });
    expect(result.success).toBe(false);
  });
});
