Overview
The backend has zero tests. All routes need happy-path and error-path coverage.
Setup
```bash
cd backend && npm install -D vitest supertest @types/supertest
```
Add to `backend/package.json`: `"test": "vitest run"`
Mock Supabase and Groq via `vi.mock()`.
Routes to test
| Route |
Happy path |
Error paths |
| `POST /messages` |
stored |
invalid body, unauthorized |
| `GET /inbox/:address` |
conversations returned |
bad address, empty inbox |
| `POST /notifications` |
created |
invalid payload |
| `GET /notifications/:address` |
list returned |
not found |
Acceptance criteria
Overview
The backend has zero tests. All routes need happy-path and error-path coverage.
Setup
```bash
cd backend && npm install -D vitest supertest @types/supertest
```
Add to `backend/package.json`: `"test": "vitest run"`
Mock Supabase and Groq via `vi.mock()`.
Routes to test
Acceptance criteria