\test(dateRange): add empty-fallback test and robust parsing"#5311
Conversation
Aamod-Dev
left a comment
There was a problem hiding this comment.
Good work on this one. I reviewed the diff and it looks ready to go from my side.
The test coverage added here looks comprehensive and well-structured. It definitely improves the reliability of the system.
I've approved the PR. Thanks again!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I've taken a look at the changes and everything seems to align with what we need here.
Looks solid. I'll go ahead and approve.
|
🎉 Congratulations @ShafinNigamana! 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! 💻✨ |
|
Review Summary |
Description
Adds a robust empty-fallback test suite for
utils/dateRange.tsand refactors theformatDateRangefunction to safely handle missing, null, undefined, empty/whitespace, or invalid year parameters without throwing exceptions or crashing.Fixes #4306
Pillar
Visual Preview
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).test(dateRange): ...).README.mdif I added a new theme or URL parameter.