🧩 Background
app/(root)/dashboard/error.tsx has logic to detect rate limit and not-found error types from the message string. This parsing has no tests.
🎯 Objective
Create app/(root)/dashboard/error.test.tsx verifying that the correct headline and emoji render for each error type.
📁 Files to touch
app/(root)/dashboard/error.test.tsx (new)
🛠️ Implementation steps
- Render with
error.message = 'API limit reached' → assert ⏳ emoji appears.
- Render with
error.message = 'User not found' → assert 🕵️♂️ emoji appears.
- Render with a generic error → assert
⚠️ emoji.
✅ Definition of done
🧩 Background
app/(root)/dashboard/error.tsxhas logic to detect rate limit and not-found error types from the message string. This parsing has no tests.🎯 Objective
Create
app/(root)/dashboard/error.test.tsxverifying that the correct headline and emoji render for each error type.📁 Files to touch
app/(root)/dashboard/error.test.tsx(new)🛠️ Implementation steps
error.message = 'API limit reached'→ assert⏳emoji appears.error.message = 'User not found'→ assert🕵️♂️emoji appears.⚠️emoji.✅ Definition of done
vitest runpasses.