-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest
Description
Problem:
The project currently has no automated tests, which makes it risky to add new features or refactor existing code. The test script in package.json is a placeholder.
Suggestion:
Introduce a testing framework like Jest or Mocha/Chai. Start by adding unit tests for utility functions (e.g., in utils/postHelpers.js) and model validations. Then, write integration tests for the API endpoints to ensure they behave as expected. This will improve code quality and developer confidence.
Proposed Steps:
- Choose and set up a testing framework (e.g., Jest, Mocha/Chai).
- Add initial unit tests for utility functions in
utils/postHelpers.js. - Write tests for model validation logic.
- Create integration tests for key API endpoints.
- Update documentation to describe how to run tests.
Benefits:
- Safer development and refactoring
- Faster detection of bugs
- Increased developer confidence
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest