TheVicky1 / TheVicky1/Pact_OS

[Test] Add Leap-Year Boundary Test Case to Habit Streak Test Suite

Open
#69 2 comments 3 reactions 1 assignee View on GitHub

@DurgaTharshini26 is already working on this.

Since Sep 18, 2026.

accessibility area:core beginner friendly bug community contributions-welcome difficulty:beginner difficulty:easy enhancement good first issue hacktoberfest help wanted testing time:<15m up-for-grabs
Dominant language
TypeScript
Stars
5
Forks
7
Avg merge
39m
Merged PRs (30d)
39

Description

  • Labels: good first issue, testing, difficulty:beginner, area:core
  • Target File: tests/habits-routines.test.ts
  • Estimated Time: 15–20 minutes
  • Difficulty: Level 3 (Beginner)
Why This Matters

Habit streak calculations must correctly handle February 28 to February 29 transitions during leap years without resetting the streak to zero.

Current Behavior

tests/habits-routines.test.ts validates daily and weekly habit streaks, but lacks an explicit leap-year boundary test case spanning 2028-02-28 to 2028-02-29 and 2028-03-01.

Requested Change

Add a new test case in tests/habits-routines.test.ts verifying that completing a daily habit on Feb 28, Feb 29 (leap day), and Mar 1 calculates a continuous 3-day streak.

Acceptance Criteria
  • Test case added in tests/habits-routines.test.ts.
  • Test passes cleanly when run via npm run test:file -- tests/habits-routines.test.ts.
  • Existing 56 test suites remain passing.
Verification
npm run test:file -- tests/habits-routines.test.ts
Contributor Notes

Follow the existing test patterns in tests/habits-routines.test.ts.


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.