test(utils): add boundary robustness tests for time normalization (#1549)#1927
test(utils): add boundary robustness tests for time normalization (#1549)#1927YerraguntaAjayKumar wants to merge 9 commits into
Conversation
|
@YerraguntaAjayKumar is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
1 similar comment
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
|
🚨 Hey @YerraguntaAjayKumar, 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 |
|
Hey! Just wanted to let you know I've resolved the merge conflicts and fixed the formatting/syntax issues. The CI pipeline is now fully passing and everything is synced up with main. It should be good to go for review whenever you have time. Thank you! |
Aamod007
left a comment
There was a problem hiding this comment.
Adds 2 timezone boundary tests for extreme offsets: UTC-12 (10 seconds to midnight) and UTC+12/UTC-14 (full 86400s at local midnight). Also adds Arrange/Act/Assert comments to existing date range validation tests. Clean +46/-0, all tests pass.
Description
This PR introduces boundary robustness tests for time and date range normalization utilities. Specifically, it ensures correct calculation of seconds until midnight across extreme timezones (e.g., UTC-12, UTC+14) without accidental calendar shifting, and verifies sliding window boundary TTLs. It also adds tests to validate safe fallbacks when partial or omitted date ranges are passed.
Fixes #1549
Pillar
Visual Preview
N/A - Back-end test suite additions only.
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): ...).README.mdif I added a new theme or URL parameter.