Files
node-code/test.js
Gitea 6838b2754c
All checks were successful
Node API Test / test (push) Successful in 24s
fifth commit
2026-04-16 15:51:19 +05:30

26 lines
625 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 home message", async () => {
const res = await request(app).get("/");
expect(res.text).toBe("🚀 Home Route Working");
});
test("GET /health should return status OK", async () => {
const res = await request(app).get("/health");
expect(res.body.status).toBe("OK");
});
});