Skip to content

Conversation

Kader1680
Copy link

What I did

  • Created initial tests for the authentication system.
  • Covered:
    • User registration /api/signup
    • User login /api/signin
    • Admin role check /api/isadmin
      Tools Used
  • Jest for unit testing.
  • Supertest for HTTP requests.
  • Used Mongoose to manually insert test users when needed.
    Notes
  • This is the initial test setup; we will later add failure cases and edge case coverage.
  • No real database data is affected — temporary test data is used.

Copy link
Owner

@hasan-py hasan-py left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test. but could you follow up the request changed?

app.listen(PORT, () => {
console.log("Server is running on ", PORT);
});
// const PORT = process.env.PORT || 8000;
Copy link
Owner

Choose a reason for hiding this comment

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

When the server will start now?? As you commented this?

Copy link
Author

Choose a reason for hiding this comment

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

yes i did the last code commented i can remove if you want

Copy link
Owner

Choose a reason for hiding this comment

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

If we comment that our app will not run. Did you run all the code you changed? I was curious is that tested on your side.

@hasan-py
Copy link
Owner

As there has been no response after 3 weeks, I’m closing the PR. If you’ve fixed it, please reopen it.

@hasan-py hasan-py closed this Aug 28, 2025
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.

2 participants