Skip to content

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

Description

@TheVicky1
  • 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.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

accessibilityAccessibility / a11y improvements (ARIA attributes, keyboard navigation, contrast)area:coreCore domain logic, shared arithmetic helpers, security, and utility servicesbeginner friendlyAccessible task suitable for developers new to open sourcebugConfirmed defect, malfunctioning behavior, or validation errorcommunityCommunity-driven enhancement, UX feedback, or resource sharingcontributions-welcomeCommunity contributions are explicitly encouraged for this issuedifficulty:beginnerBeginner-friendly task with single-file scope and clear acceptance criteriadifficulty:easyStraightforward task requiring basic familiarity with React/TypeScriptenhancementSmall improvement, refinement, or feature expansiongood first issueCurated, self-contained task suitable for first-time contributorshacktoberfestEligible high-quality task for open-source community eventshelp wantedMaintainer is actively welcoming community contributions on this issuetestingUnit tests, test matrix expansion, validation fixtures, and regression coveragetime:<15mQuick fix, typo correction, or minor tweak (< 15 minutes)up-for-grabsUnassigned issue that is available for any contributor

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions