Skip to content

test : added unit tests for toastStore - #2081

Merged
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
tmdeveloper007:#2059
Jun 7, 2026
Merged

test : added unit tests for toastStore#2081
riteshbonthalakoti merged 1 commit into
riteshbonthalakoti:gssocfrom
tmdeveloper007:#2059

Conversation

@tmdeveloper007

Copy link
Copy Markdown

Closes #2059.

Summary of What Has Been Done:
Added unit tests for the toastStore notification system.

Changes Made:

  • Created Frontend/src/store/toastStore.test.js with 10 test cases
  • Uses zustand store directly (no Supabase dependencies)
  • Uses vitest fake timers for duration-based auto-removal tests
  • Tests showToast with different types, removeToast, non-existent id handling, and multiple toasts
  • Verifies Infinity duration prevents auto-removal

Impact it Made:

  • Ensures notification system works reliably across the app
  • Guards against timer leaks and stale toast references
  • All 10 tests pass (verified with vitest run)

@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tmdeveloper007, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 34 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a032bd6a-3fec-4d5a-aecf-de528e6a5f93

📥 Commits

Reviewing files that changed from the base of the PR and between da8faf2 and 055a49c.

📒 Files selected for processing (1)
  • Frontend/src/store/toastStore.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@riteshbonthalakoti
riteshbonthalakoti changed the base branch from main to gssoc June 7, 2026 16:01
@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Hi @tmdeveloper007! Thanks for the contribution. I have triaged your PR and set it to merge into the gssoc branch.

⚠️ MANDATORY GSSOC ONBOARDING STEPS:
Before your PR points are finalized on the leaderboard, you MUST complete these required steps:

  1. Star this repository: https://github.com/ritesh-1918/HELPDESK.AI (Mandatory)
  2. 👤 Follow the Project Admin: https://github.com/ritesh-1918 (Mandatory)
  3. 💼 Connect on LinkedIn: https://www.linkedin.com/in/ritesh1908/ (Mandatory)

Welcome to the HELPDESK.AI developer family! 🚀💻

@riteshbonthalakoti
riteshbonthalakoti merged commit b833b86 into riteshbonthalakoti:gssoc Jun 7, 2026
9 of 10 checks passed
@tmdeveloper007

Copy link
Copy Markdown
Author

Hi @ritesh-1918, this PR was merged but does not have GSSoC labels applied. Could you please add the appropriate labels (e.g. gssoc, gssoc:approved, level:beginner/level:advanced, type:testing/type:bug/type:docs etc.) so the contribution is properly tracked for GSSoC? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for toastStore

2 participants