Scope:
Implement unit tests for core modules (e.g., Users, Auth, Booking, Experience, Feedback, etc.).
Add tests for critical services (business logic) and controllers (API endpoints).
Mock external dependencies (database, Redis, RabbitMQ, Bull queues, etc.) where necessary.
Ensure tests follow Arrange-Act-Assert (AAA) pattern for readability.
Integrate test execution into CI/CD pipeline.
Acceptance Criteria:
Minimum of 70–80% test coverage across the codebase.
All modules have basic test suites for controllers and services.
Tests run successfully with npm run test and npm run test:cov.
Documentation updated in README.md with instructions to run tests locally.
Benefits:
Improves reliability and stability of the backend.
Reduces risk of regression during feature updates.
Establishes a testing culture for future contributions.
Scope:
Implement unit tests for core modules (e.g., Users, Auth, Booking, Experience, Feedback, etc.).
Add tests for critical services (business logic) and controllers (API endpoints).
Mock external dependencies (database, Redis, RabbitMQ, Bull queues, etc.) where necessary.
Ensure tests follow Arrange-Act-Assert (AAA) pattern for readability.
Integrate test execution into CI/CD pipeline.
Acceptance Criteria:
Minimum of 70–80% test coverage across the codebase.
All modules have basic test suites for controllers and services.
Tests run successfully with npm run test and npm run test:cov.
Documentation updated in README.md with instructions to run tests locally.
Benefits:
Improves reliability and stability of the backend.
Reduces risk of regression during feature updates.
Establishes a testing culture for future contributions.