Skip to content

test(issue-time): stabilize relative age fixtures across DST - #2163

Merged
beruro merged 1 commit into
developfrom
junyu/fix-issue-age-test-clock
Sep 29, 2026
Merged

beruro merged 1 commit into
developfrom
junyu/fix-issue-age-test-clock

Conversation

@beruro

@beruro beruro commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

The issue-age test creates “months ago” and “days ago” timestamps by changing local calendar dates. A daylight-saving transition can shift the elapsed duration by an hour, making the shared relative-time formatter correctly return 10mo ago while the test expects 11mo ago. This intermittently fails the full frontend CI suite, including the conversation Sources PR.

Solution

Build these test fixtures from elapsed milliseconds, matching the formatter's 24-hour day and 30-day month definitions. Production behavior is unchanged; the test now measures the intended duration in every time zone.

Potential risks

This changes only test fixture construction. It does not change user-visible date formatting, stored data, APIs, or runtime behavior. The full repository CI suite remains to be observed on this PR before merge; the targeted test passed in both a daylight-saving time zone and UTC.

Verification

  • TZ=America/Los_Angeles pnpm test src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/__tests__/workstationIssueHelpers.test.ts — 29 passed.
  • TZ=UTC pnpm test src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/__tests__/workstationIssueHelpers.test.ts — 29 passed.
  • pnpm typecheck:fast — passed.
  • Changed-file ESLint, Prettier check, commit hooks, and git diff --cached --check — passed.
  • Full repository suite and native checks were not run locally. This test-only change has no visual UI state to capture.

@beruro
beruro merged commit b4a98f0 into develop Sep 29, 2026
15 checks passed
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.

1 participant