\test(time): add empty-fallback test and fix timezone mock"#5309
Conversation
38053df to
cc38cdd
Compare
|
🚨 Hey @ShafinNigamana, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
c229317 to
b1401a3
Compare
b1401a3 to
bc80b3b
Compare
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the PR. It looks like a good start, but there are a few areas that could use some refinement to ensure long-term maintainability. Let's get these sorted out.
- I noticed some leftover debugging statements (e.g.,
console.log). Let's make sure to clean those up before merging so they don't clutter the production logs.
Looking forward to seeing the revised version. Thanks for your hard work on this.
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for your contribution. The overall direction looks good, but there are a few issues to address:
- I noticed some leftover debugging statements (
console.log). Please remove them before we can merge this.
Let me know when you've updated the PR!
Aamod-Dev
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I went through the changes and the overall approach looks good. The fallback logic for missing timezones is well implemented, and the tests clearly cover the edge cases. I'll go ahead and approve this PR. Thanks again for the contribution.
|
🎉 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! 💻✨ |
Description
Adds a robust empty-fallback test suite for
utils/time.ts, refactorsgetSecondsUntilMidnightInTimezoneto safely default to UTC calculations when timezone inputs are missing, empty, ornull/undefined, and corrects a pre-existing construction TypeError inutils/time.massive-scaling.test.ts.Fixes #4308
Pillar
Visual Preview
N/A — Purely a logic / unit testing update. No visual changes.
Checklist before requesting a review:
CONTRIBUTING.mdfile.npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.