Test the error boundary reset and the not-found page
Description
src/app/error.tsx is the route error boundary (renders an error heading and a "Try again" button bound to reset) and src/app/not-found.tsx renders the 404 with a back-home link — neither has a test, so a regression in the reset wiring or the 404 link would ship unnoticed. This issue covers both.
Requirements and context
- Repository scope: Agentpay-Org/Agentpay-frontend only.
- error.tsx: assert the error message renders, clicking "Try again" calls the
reset prop, and the recovery affordance is reachable.
- not-found.tsx: assert the 404 heading and a link back to
/ render.
- If error.tsx does not yet announce its message via
role="alert", add it and assert it (small a11y fix bundled with the test).
Suggested execution
- Fork the repo and create a branch
git checkout -b test/testing-error-notfound
- Implement changes
- Test and commit
Test and commit
- Run
npm run lint, npm run typecheck, npm test, and npm run build.
- Cover edge cases: error with a digest, empty message, and the 404 link target.
- Include the
npm test output and coverage for both files.
Example commit message
test(app): cover error boundary reset and not-found page
Guidelines
- Minimum 95 percent test coverage for both files.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the AgentPay community on Discord for questions, reviews, and faster merges: https://discord.gg/eXvRKkgcv
- ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.
Test the error boundary reset and the not-found page
Description
src/app/error.tsxis the route error boundary (renders an error heading and a "Try again" button bound toreset) andsrc/app/not-found.tsxrenders the 404 with a back-home link — neither has a test, so a regression in the reset wiring or the 404 link would ship unnoticed. This issue covers both.Requirements and context
resetprop, and the recovery affordance is reachable./render.role="alert", add it and assert it (small a11y fix bundled with the test).Suggested execution
git checkout -b test/testing-error-notfoundrole="alert"to the error message insrc/app/error.tsxif missing.src/app/error.test.tsxandsrc/app/not-found.test.tsx.Test and commit
npm run lint,npm run typecheck,npm test, andnpm run build.npm testoutput and coverage for both files.Example commit message
test(app): cover error boundary reset and not-found pageGuidelines
Community & contribution rewards