Files
node-code/test.js
Gitea 2132babc51
Some checks failed
Node API Test / test (push) Failing after 17s
sixth commit
2026-04-16 15:58:11 +05:30

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");
});
});