import { healthcheck } from "../healthcheck"
import { jest, describe, it, expect } from "@jest/globals"

describe("healthcheck", () => {
  it("should respond with status 200 and 'OK'", () => {
    const req = {}
    const res = {
      status: jest.fn().mockReturnThis(),
      send: jest.fn(),
    }

    healthcheck(req, res)

    expect(res.status).toHaveBeenCalledWith(200)
    expect(res.send).toHaveBeenCalledWith("OK")
  })
})
