seventh commit
Node API Test / test (push) Successful in 25s

This commit is contained in:
Gitea
2026-04-20 09:53:53 +05:30
parent 2132babc51
commit 79008d0c7c
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -6,7 +6,7 @@ app.use(express.json());
app.get("/", (req, res) => {
res.json({
status: "OK",
message: "Home Route Working"
message: "Home Route Working Fine"
});
});
@@ -19,6 +19,7 @@ app.get("/health", (req, res) => {
module.exports = app;
// only start server if not testing
// It ensures the server starts only when the file is run directly, not when it is imported for testing.
if (require.main === module) {
+1 -1
View File
@@ -15,7 +15,7 @@ describe("API Testing", () => {
test("GET / should return status ok", async () => {
const res = await request(app).get("/");
expect(res.body.status).toBe("ok");
expect(res.body.status).toBe("OK");
});
test("GET /health should return status OK", async () => {