test(utils): verify query parameter debouncing#1985
Conversation
|
@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. |
|
👋 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:
A maintainer will review your PR shortly. Hang tight! 🚀 |
There was a problem hiding this comment.
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.
|
🎉 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.
Keep building! 💻✨ |
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
Visual Preview
Not applicable. This PR only adds a utility test.
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): ...).