Skip to content

test(calculate): verify calculateStreak with a 365-day all-contributi…#1972

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
imuniqueshiv:test/calculate-365-day-streak
May 31, 2026
Merged

test(calculate): verify calculateStreak with a 365-day all-contributi…#1972
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
imuniqueshiv:test/calculate-365-day-streak

Conversation

@imuniqueshiv
Copy link
Copy Markdown
Contributor

Description

Adds a new test case to verify the maximum streak scenario in calculateStreak.

The test creates a 365-day contribution calendar where every day has contributionCount: 1 and validates that:

  • currentStreak === 365
  • longestStreak === 365
  • totalContributions === 365

This ensures the streak calculation logic correctly handles a full year of continuous contributions and covers a previously untested edge case.

Fixes #681

Pillar

  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (test-only change)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • My commits follow the Conventional Commits format.
  • I have started the repo.
  • I have made sure that I have only one commit to merge in this PR.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 31, 2026

@imuniqueshiv is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a 365-day all-contributions streak test verifying currentStreak, longestStreak, and otalContributions. Clean +10/-0, 55/55 tests pass.

@JhaSourav07 JhaSourav07 merged commit fa5dd5b into JhaSourav07:main May 31, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Congratulations @imuniqueshiv! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@JhaSourav07 JhaSourav07 added GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points mentor:Aamod007 labels May 31, 2026
@github-actions github-actions Bot added this to the GSSoC 2026 milestone May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(calculate): verify calculateStreak with a 365-day all-contribution calendar

3 participants