Skip to content

test(quota-monitor): add timezone boundary coverage#5747

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
pari-28:test-2930-quota-monitor-timezone
Jun 15, 2026
Merged

test(quota-monitor): add timezone boundary coverage#5747
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
pari-28:test-2930-quota-monitor-timezone

Conversation

@pari-28

@pari-28 pari-28 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #2930

Added services/github/quota-monitor.timezone-boundaries.test.ts to provide isolated test coverage for timezone normalization and calendar boundary scenarios in the quota monitor.

Added Test Coverage

  • UTC midnight reset timestamp handling
  • EST calendar boundary timestamp preservation
  • IST and JST boundary timestamp updates
  • Leap-year reset timestamp processing
  • Daylight-saving transition timestamp handling while preserving quota state

Validation

  • Added 5 test cases
  • Verified locally using Vitest
  • npm run typecheck passes successfully
  • All new tests passing successfully

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ 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 (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard.
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3433.75 KB 3433.75 KB 0 B
Total CSS 258.05 KB 258.05 KB 0 B

@Aamod007 Aamod007 added level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. mentor:Aamod007 type:testing Adding, updating, or fixing tests labels Jun 15, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I reviewed the PR title/description, linked issue #2930, checks, and the diff before labeling.

Labels applied:

  • level:beginner: the change is a 69-line timezone-boundary test file in services/github/quota-monitor.timezone-boundaries.test.ts, and it stays focused on reset-time handling.
  • quality:clean: the test cases are short, explicit, and close to the quota monitor API being exercised.
  • type:testing: the PR is dedicated test coverage for quota-monitor timezone boundaries.
  • type:logic: the assertions are about timestamp normalization and date-boundary behavior, which is the core logic under test.

I’m leaving this as a neutral comment rather than approving because the repo checks are green but the PR is still carrying a failing Vercel status context. That looks like a deployment integration/auth issue rather than a code failure.

To unblock it, the Vercel GitHub integration for the repo/team needs to be re-authorized or the status needs to be marked non-blocking by maintainers. Once the Vercel context is green, this can be reviewed normally.

@Aamod007 Aamod007 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 15, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good narrow test coverage for the quota monitor. services/github/quota-monitor.timezone-boundaries.test.ts exercises the reset-time parsing across UTC, leap-year, and DST-style boundaries, which is exactly where this sort of state can get slippery.

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 15, 2026
@JhaSourav07 JhaSourav07 merged commit a66792b into JhaSourav07:main Jun 15, 2026
6 of 7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @pari-28! 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! 💻✨

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 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(quota-monitor-timezone-boundaries): verify Timezone Normalization & Calendar Data Boundary Alignment (Variation 8)

3 participants