Problem statement
The backend/ (Node/Express API) currently has no test suite — no unit tests and no integration tests. This backend was recently migrated from Flask to Node/Express (#269), so the codebase is fresh and doesn't yet have test coverage. Without tests, regressions in API routes, database queries, or business logic can go unnoticed, especially as new contributors add features.
Proposed solution
Set up a test suite for the backend using a standard Node testing stack, for example:
- Jest (or Mocha + Chai) as the test runner/assertion library
- Supertest for HTTP/integration testing of Express routes
- Mock or test-database setup for DB-dependent tests
Suggested initial scope:
- Unit tests for utility/helper functions
- Integration tests for core API endpoints (e.g. search, distro data routes)
- Basic error-handling test cases (invalid input, DB failure, etc.)
- CI integration so tests run automatically on PRs
Acceptance Criteria
Alternatives considered
No response
Problem statement
The backend/ (Node/Express API) currently has no test suite — no unit tests and no integration tests. This backend was recently migrated from Flask to Node/Express (#269), so the codebase is fresh and doesn't yet have test coverage. Without tests, regressions in API routes, database queries, or business logic can go unnoticed, especially as new contributors add features.
Proposed solution
Set up a test suite for the backend using a standard Node testing stack, for example:
Suggested initial scope:
Acceptance Criteria
Alternatives considered
No response