Description
Write tests covering the current risk evaluation endpoint, including success and error cases (missing walletAddress, invalid address).
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
Suggested execution
- Fork the repo and create a branch
git checkout -b test/risk-evaluate-endpoint
- Implement changes
- Add tests using supertest (or similar) for
/api/risk/evaluate
- Cover 200, 400, and other relevant cases
- Test and commit
- Run tests and include output
Example commit message
test: add coverage for /api/risk/evaluate endpoint
Guidelines
- Minimum 95 percent test coverage for this route
- Clear documentation
- Timeframe: 96 hours
- Project details: creditra-backend