Problem
Backend tests exist in micopay/backend/src/tests/ (12 test files) but are not run in CI. The .github/workflows/ci.yml only runs npm run build for the backend — no npm run test step.
This means:
- Code changes can break tests without anyone knowing
- Security tests (security.test.ts, abuse.service.test.ts) never run
- Regression bugs slip through to production
Impact
- Untested code ships to production
- Security vulnerabilities go undetected
- No safety net for refactoring
Proposed Fix
- Add
npm run test step to the backend CI job in .github/workflows/ci.yml
- Ensure all test files can run without external dependencies (Redis, etc.)
- If tests require a database, use a service container in CI
- Add test coverage reporting (optional but recommended)
Files to modify
.github/workflows/ci.yml (backend job section)
Acceptance Criteria
Problem
Backend tests exist in
micopay/backend/src/tests/(12 test files) but are not run in CI. The.github/workflows/ci.ymlonly runsnpm run buildfor the backend — nonpm run teststep.This means:
Impact
Proposed Fix
npm run teststep to the backend CI job in.github/workflows/ci.ymlFiles to modify
.github/workflows/ci.yml(backend job section)Acceptance Criteria