Skip to content

test(utils): verify query parameter debouncing#1985

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
yadavayush834:test-query-parameter-debouncing
May 31, 2026
Merged

test(utils): verify query parameter debouncing#1985
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
yadavayush834:test-query-parameter-debouncing

Conversation

@yadavayush834
Copy link
Copy Markdown

Description

Added a utility-level test verifying that rapid synchronous query inputs are debounced correctly. Only the final value resolves once after the timer expires.

Fixes #1557

Pillar

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

Visual Preview

Not applicable. This PR only adds a utility test.

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): ...).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

Copilot AI review requested due to automatic review settings May 31, 2026 06:21
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 31, 2026

@ayushyadav100 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 @yadavayush834, 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! 🚀

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a unit test for the useDebounce hook to verify that rapid value changes are resolved exactly once after the debounce interval elapses.

Changes:

  • New test file using Vitest and React Testing Library
  • Uses fake timers to assert behavior at the 299ms and 300ms boundaries
  • Wraps the hook in an observer helper that surfaces the debounced value via callback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Aamod007
Aamod007 approved these changes May 31, 2026
@JhaSourav07 JhaSourav07 added GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points mentor:Aamod007 labels May 31, 2026
@JhaSourav07 JhaSourav07 merged commit 3b3f01c into JhaSourav07:main May 31, 2026
9 of 10 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone May 31, 2026
@github-actions
Copy link
Copy Markdown

🎉 Congratulations @yadavayush834! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

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

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(utils): check boundary robustness of query parameter debouncing (Variation 1)

5 participants