Commit 60b2df1
authored
test(utils): check boundary robustness of rate limit TTL timers (Variation 3) (JhaSourav07#2229)
## Description
Adds a utility verification test to validate sliding time range behavior
and ensure keys expire exactly at the configured window boundary.
### Changes Made
- Added 1 new test block for the utility function.
- Verified behavior across sliding time ranges.
- Confirmed that keys remain valid before the window limit and expire
exactly at the boundary.
### Testing
- Utility verification tests compile successfully.
- Existing test suite remains unaffected.
Fixes JhaSourav07#1571
## Pillar
- [ ] 🎨 Pillar 1 — New Theme Design
- [ ] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
<img width="1537" height="768" alt="image"
src="https://github.com/user-attachments/assets/a7e4ff33-e7b6-4e62-9d8c-9b8c1b3c5659"
/>
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
- [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
- [x] I have updated `README.md` if I added a new theme or URL
parameter.
- [x] I have started the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (no raw elements, smooth animations, correct fonts).
- [ ] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
267 | 286 | | |
268 | 287 | | |
269 | 288 | | |
| |||
0 commit comments