Commit eb1bedc
authored
test(calculate): verify streak formulas for timezone shifts around midnight timeline (JhaSourav07#2016)
## Description
Fixes JhaSourav07#1470
Adds a dedicated test covering streak calculations around midnight
timezone transitions.
This test simulates contributions occurring at 23:59 and 00:01 UTC and
verifies that current streak and longest streak calculations remain
accurate across the date boundary.
### Changes Made
- Added a dedicated test for streak calculations around midnight
boundaries
- Simulated contributions occurring at 23:59 and 00:01 UTC
- Verified current streak calculations before and after the date
transition
- Verified longest streak calculations remain accurate across the
boundary
- Added assertions for timezone-aware date resolution
## Pillar
Testing
## Checklist
- [x] Added/updated tests
- [x] npm run lint passes
- [x] npm run typecheck passes
- [x] npm run test passes
- [x] Verified streak calculations across 23:59 → 00:01 midnight
transitions
### Result
- Protects against off-by-one streak errors around date boundaries
- Ensures timezone-aware streak calculations remain accurate
- Adds regression coverage for midnight transition edge cases1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
895 | 930 | | |
896 | 931 | | |
897 | 932 | | |
| |||
0 commit comments