🧩 Background
Input validation prevents arbitrary code and path traversal sequences from reaching the application core logic.
🎯 Objective
Write a schema-level validation test targeting the ?org= parameter under alphanumeric format check.
📁 Files to touch
app/api/streak/route.test.ts
lib/validations.test.ts
🛠️ Implementation steps
- Mock a request passing the invalid value:
'invalid_org_name_with_spaces'.
- Assert that the validation handler returns a 400 Bad Request with 'Invalid organization name format'.
✅ Definition of done
🧩 Background
Input validation prevents arbitrary code and path traversal sequences from reaching the application core logic.
🎯 Objective
Write a schema-level validation test targeting the
?org=parameter under alphanumeric format check.📁 Files to touch
app/api/streak/route.test.tslib/validations.test.ts🛠️ Implementation steps
'invalid_org_name_with_spaces'.✅ Definition of done