Skip to content

Add a unit test for the useTestNotification send and status handling#1117

Merged
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
Baskarayelu:issue-985
Jun 29, 2026
Merged

Add a unit test for the useTestNotification send and status handling#1117
1nonlypiece merged 1 commit into
Commitlabs-Org:masterfrom
Baskarayelu:issue-985

Conversation

@Baskarayelu

Copy link
Copy Markdown
Contributor

Closes #985

Summary

  • Add src/hooks/__tests__/useTestNotification.test.ts with 6 focused unit tests
  • Mock fetch and useToast to verify success/failure paths without real network calls
  • Assert idle -> sending -> sent/error state transitions
  • Cover double-send guard (second call while in-flight is a no-op)
  • Cover empty channelId guard (no fetch called)
  • Cover two channels tracked independently

Test plan

  • pnpm test src/hooks/__tests__/useTestNotification.test.ts passes all 6 tests
  • No regressions against existing test suites

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Baskarayelu is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

@1nonlypiece 1nonlypiece merged commit ce553d3 into Commitlabs-Org:master Jun 29, 2026
2 of 12 checks passed
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.

Add a unit test for the useTestNotification send and status handling

2 participants