Closed
Description
Description:
Write unit tests to ensure reliability for user profile-related operations, including creating profiles, editing them, and fetching the portfolio.
Tasks:
Write tests for POST /api/users/profile to ensure new user profiles are created successfully.
Write tests for PUT /api/users/profile/:id to validate correct updates to a user’s bio/skills or profile picture.
Write tests for GET /api/users/profile/:id/portfolio to validate fetching a user’s portfolio data.
Use Jest (or a similar testing framework) to mock database interactions with MongoDB.
Handle edge cases such as invalid data submissions, database connection failures, or missing fields.
Estimated Time: 48 hours
Please claim this issue