26 lines
608 B
JavaScript
26 lines
608 B
JavaScript
// console.log("Running CI test...");
|
|
|
|
// if (1 + 1 === 2) {
|
|
// console.log("✅ TEST PASSED");
|
|
// process.exit(0);
|
|
// } else {
|
|
// console.log("❌ TEST FAILED");
|
|
// process.exit(1);
|
|
// }
|
|
|
|
const request = require("supertest");
|
|
const app = require("./index");
|
|
|
|
describe("API Testing", () => {
|
|
|
|
test("GET / should return status ok", async () => {
|
|
const res = await request(app).get("/");
|
|
expect(res.body.status).toBe("ok");
|
|
});
|
|
|
|
test("GET /health should return status OK", async () => {
|
|
const res = await request(app).get("/health");
|
|
expect(res.body.status).toBe("OK");
|
|
});
|
|
|
|
}); |