15 lines
432 B
JavaScript
15 lines
432 B
JavaScript
import { describe, it, expect } from "vitest";
|
|
import request from "supertest";
|
|
import express from "express";
|
|
|
|
const app = express();
|
|
app.get("/api/health", (req, res) => res.json({ status: "ok" }));
|
|
|
|
describe("API", () => {
|
|
it("returns health status", async () => {
|
|
const response = await request(app).get("/api/health");
|
|
expect(response.status).toBe(200);
|
|
expect(response.body).toEqual({ status: "ok" });
|
|
});
|
|
});
|