Skip to content

Feature: Automated Testing & CI/CD Pipeline#53

Open
Shravanthi20 wants to merge 16 commits into
hitesh-kumar123:mainfrom
Shravanthi20:main
Open

Feature: Automated Testing & CI/CD Pipeline#53
Shravanthi20 wants to merge 16 commits into
hitesh-kumar123:mainfrom
Shravanthi20:main

Conversation

@Shravanthi20

@Shravanthi20 Shravanthi20 commented Jan 3, 2026

Copy link
Copy Markdown

PR: Feat: Automated Testing & CI/CD Pipeline

📌 Linked Issue


🛠 Changes Made

  • Added: Installed jest and supertest for backend API testing.
  • Added: Created .github/workflows/node.js.yml for automated CI/CD on Push/PR.
  • Added: New test files backend/tests/health.test.js and backend/tests/property.test.js.
  • Updated: Modified backend/package.json to include the test script.
  • Updated: Refactored backend/app.js and backend/server.js to decouple app definition from server startup (enables testing).
  • Fixed: Removed package-lock.json from .gitignore to ensure consistent CI builds.

🧪 Testing

  • Ran unit tests (npm test)
  • Tested manually (describe below):
    • Test case 1: Ran npm test locally in backend/ directory -> All passed.
    • Test case 2: Pushed to GitHub -> Verified Action "Node.js CI" passed successfully.

📸 UI Changes (if applicable)

Before After
N/A N/A

(Backend changes only)


📝 Documentation Updates

  • Updated README/docs
  • Added code comments (in test files)
  • Removed package-lock.json from .gitignore to make it public

✅ Checklist

💡 Additional Notes (If any)

  • This PR introduces a pattern for integration testing with MongoDB.
  • The CI pipeline spins up a dedicated MongoDB container for isolation.

@netlify

netlify Bot commented Jan 3, 2026

Copy link
Copy Markdown

Deploy Preview for smartrentsystem ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ee39d9c
🔍 Latest deploy log https://app.netlify.com/projects/smartrentsystem/deploys/69620e3b2b10040008aff13c
😎 Deploy Preview https://deploy-preview-53--smartrentsystem.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Shravanthi20

Copy link
Copy Markdown
Author

@hitesh-kumar123 could you pls verify and merge it

@hitesh-kumar123

Copy link
Copy Markdown
Owner

Thanks for the detailed PR — the testing & CI setup is a solid improvement 👍

Before merging, a few blocking issues need to be addressed:

server.js has a duplicate require("./app") — please keep only the exported app import.

MongoDB connection logic was changed; please ensure safe fallback handling when env vars are missing.

Please re-check backend/package.json — the current diff suggests duplicate keys / missing commas.

Clarify whether /api/properties/test is a test-only endpoint or production route.

Large lockfile changes (frontend + backend) make review difficult — consider isolating them if possible.

Once these are fixed, I’ll be happy to approve and merge.

@Shravanthi20

Copy link
Copy Markdown
Author

@hitesh-kumar123 Sorry for the trouble! i have made the necessary changes, i hope it is fine now.

@promiseer promiseer self-requested a review January 6, 2026 09:50

@promiseer promiseer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shravanthi20 check comments and push your changes

Comment thread backend/app.js Outdated
Comment thread .gitignore
@Shravanthi20 Shravanthi20 requested a review from promiseer January 6, 2026 14:46
Comment thread backend/app.js Outdated
@Shravanthi20 Shravanthi20 requested a review from promiseer January 7, 2026 05:35
@Shravanthi20

Copy link
Copy Markdown
Author

@hitesh-kumar123 @promiseer could you pls check, if the PR can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants