test: add error boundary tests and configure jest-dom#619
test: add error boundary tests and configure jest-dom#619HimanshuGaur14 wants to merge 1 commit into
Conversation
|
@HimanshuGaur14 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @HimanshuGaur14, welcome to CommitPulse! 🎉 Thanks for opening your first pull request — this is a big deal and we appreciate the effort! While you wait for a review, please double-check:
A maintainer will review your PR shortly. Hang tight! 🚀 |
|
🚨 Hey @HimanshuGaur14, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
Description
Fixes #391
Changes made
app/(root)/dashboard/error.test.tsx (new) — 3 test cases verifying the correct emoji renders for each error type:⚠️ for generic errors
- ⏳ for rate-limit errors ("API limit reached")
- 🕵️♂️ for not-found errors ("User not found")
-
vitest.setup.ts (new) — registers @testing-library/jest-dom matchers with Vitest so toBeInTheDocument() works
vitest.config.ts (modified) — added setupFiles: ['./vitest.setup.ts'] to load the setup file before tests run
Pillar
Visual Preview
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.