Area
Notification Service / Testing
Complexity
Easy
File(s)
notification-service/src/api.ts (DELETE handler, lines 169-172); notification-service/src/db.ts (getAllEnabledPreferences, lines 127-134)
Problem
api.test.ts has no test exercising the DELETE /preferences/:address route at all — not the success path, not deleting a non-existent address. Separately, Store.getAllEnabledPreferences() in db.ts has no callers anywhere in src/ (not in index.ts, notifier.ts, or api.ts) and no test coverage — it reads as though it was meant to be the way the notifier fans out to eligible investors, but the actual data path goes through getInvestorsForProject instead.
Scope
In:
- Add DELETE endpoint tests (existing address, non-existent address, verify idempotent 204); either wire getAllEnabledPreferences into an actual use case or remove it.
Out:
- A broader API test refactor.
Acceptance Criteria
Area
Notification Service / Testing
Complexity
Easy
File(s)
notification-service/src/api.ts (DELETE handler, lines 169-172); notification-service/src/db.ts (getAllEnabledPreferences, lines 127-134)
Problem
api.test.ts has no test exercising the DELETE /preferences/:address route at all — not the success path, not deleting a non-existent address. Separately, Store.getAllEnabledPreferences() in db.ts has no callers anywhere in src/ (not in index.ts, notifier.ts, or api.ts) and no test coverage — it reads as though it was meant to be the way the notifier fans out to eligible investors, but the actual data path goes through getInvestorsForProject instead.
Scope
In:
Out:
Acceptance Criteria