test: add comprehensive unit tests for streak calculation utilities#2746
test: add comprehensive unit tests for streak calculation utilities#2746Shanidhya01 wants to merge 6 commits into
Conversation
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
Legit-Ox
left a comment
There was a problem hiding this comment.
Test coverage is solid — good edge case variety across leap years, month transitions, timezone boundaries, and freeze dates. Three issues before merging:
rolldownadded to productiondependencies— unrelated to this PR and shouldn't be there at all- One test name directly contradicts its assertion
package-lock.jsonaccidentally narrows the Node engine range
|
Ok will fix it by the end of the day |
…est/streak-calculation-1069
…e range, fix test name - Remove rolldown from dependencies (build tool, not a runtime lib) - Restore engines.node to >=20.0.0 to avoid excluding Node 22/24 - Rename misleading test that said does not treat Feb 28 → Mar 1 as consecutive when the assertion proves they are consecutive in a non-leap year
|
The test coverage here is genuinely strong — the timezone edge cases, leap year handling, and streak-utils coverage are valuable. A few things to fix before merge:
Fix these and the test quality is solid enough to merge. |
Summary
Adds comprehensive unit tests for streak calculation utility functions to improve reliability and prevent regressions in DevTrack's streak tracking system.
Closes #1069
Changes Made
Test Coverage
Covered scenarios:
Type of Change
Checklist