Skip to content

test(CompareClient-timezone-boundaries): verify Timezone Normalization & Calendar Data Boundary Alignment#3563

Open
AryanRajuBankar3000 wants to merge 1 commit into
JhaSourav07:mainfrom
AryanRajuBankar3000:test/CompareClient-timezone-boundaries
Open

test(CompareClient-timezone-boundaries): verify Timezone Normalization & Calendar Data Boundary Alignment#3563
AryanRajuBankar3000 wants to merge 1 commit into
JhaSourav07:mainfrom
AryanRajuBankar3000:test/CompareClient-timezone-boundaries

Conversation

@AryanRajuBankar3000
Copy link
Copy Markdown
Contributor

@AryanRajuBankar3000 AryanRajuBankar3000 commented Jun 3, 2026

Description

Fixes #2790

Hey @souravjhahind, the isolated unit and integration testing for the CompareClient timezone normalization and calendar data boundaries is complete! All 5 test cases are successfully passing.

Implementation details:

  1. Mocked next/navigation and recharts to ensure the component mounts safely in the JSDOM environment without native browser context or SVG rendering crashes.
  2. Utilized vi.useFakeTimers() to safely hijack the system clock and manipulate dates without impacting other test suites.
  3. Froze time using vi.setSystemTime() to standardize date checks and eliminate test flakiness across different local environments.
  4. Simulated leap year boundaries (e.g., Feb 29) and daylight savings transition gaps to ensure the component renders stably under edge-case timezone conditions.

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 - This PR strictly adds testing infrastructure (CompareClient.timezone-boundaries.test.tsx), so there are no visual UI changes.

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run format and npm run lint locally and resolved all errors.
  • My commits follow the Conventional Commits format.
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started 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.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 3, 2026

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

A member of the Team first needs to authorize it.

@AryanRajuBankar3000
Copy link
Copy Markdown
Contributor Author

Hey @souravjhahind @Aamod007

PR is officially ready for review! All 5 timezone and calendar boundary tests are passing perfectly.

Used Vitest's fake timers to safely simulate the leap year and daylight savings time transitions without causing any flakiness based on local machine clocks. Let me know if everything looks good to merge!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant