Skip to content

test: add error boundary tests and configure jest-dom#619

Open
HimanshuGaur14 wants to merge 1 commit into
JhaSourav07:mainfrom
HimanshuGaur14:fix/dashboard-error-tests
Open

test: add error boundary tests and configure jest-dom#619
HimanshuGaur14 wants to merge 1 commit into
JhaSourav07:mainfrom
HimanshuGaur14:fix/dashboard-error-tests

Conversation

@HimanshuGaur14
Copy link
Copy Markdown

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 rate-limit errors ("API limit reached")
    - 🕵️‍♂️ for not-found errors ("User not found")
    - ⚠️ for generic errors

  • 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

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • [] I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

@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.

@github-actions
Copy link
Copy Markdown

👋 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:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label May 27, 2026
@github-actions
Copy link
Copy Markdown

🚨 Hey @HimanshuGaur14, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

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 passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing tests label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:blocked This PR is blocked due to a failing CI check. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(dashboard): add error boundary component test for DashboardError

1 participant