Skip to content

fix: mock timezone in getTimezoneGMTString test#814

Merged
max246 merged 1 commit intobropat:developfrom
nick-pape:fix/timezone-test
Feb 24, 2026
Merged

fix: mock timezone in getTimezoneGMTString test#814
max246 merged 1 commit intobropat:developfrom
nick-pape:fix/timezone-test

Conversation

@nick-pape
Copy link
Copy Markdown
Contributor

Summary

  • The getTimezoneGMTString test hardcoded GMT+00:00, so it only passed on machines set to UTC
  • Mocks Date.prototype.getTimezoneOffset to test three timezones: UTC, EST (UTC-5), and IST (UTC+5:30)
  • Resolves the existing TODO comment about mocking other timezones

Test plan

  • npx jest src/http/__test__/utils.test.tsx passes (80/80 tests)
  • Verified on a non-UTC machine (CST/UTC-6)

🤖 Generated with Claude Code

The test hardcoded GMT+00:00 so it only passed on UTC machines.
Mock Date.getTimezoneOffset to test UTC, EST, and IST timezones.
@max246 max246 merged commit bdf14ae into bropat:develop Feb 24, 2026
2 checks passed
@max246 max246 mentioned this pull request Mar 1, 2026
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.

2 participants