fifth commit
All checks were successful
Node API Test / test (push) Successful in 24s

This commit is contained in:
Gitea
2026-04-16 15:51:19 +05:30
parent dbda40e864
commit 6838b2754c
5 changed files with 4256 additions and 16 deletions

33
test.js
View File

@@ -1,9 +1,26 @@
console.log("Running CI test...");
// console.log("Running CI test...");
if (1 + 1 === 2) {
console.log("✅ TEST PASSED");
process.exit(0);
} else {
console.log("❌ TEST FAILED");
process.exit(1);
}
// 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");
});
});