Repository navigation
Pin vitest timezone to UTC for deterministic date tests - #58
Merged
Merged
Conversation
GameRecap and PredictionCard format timestamps with toLocaleDateString in local time, and their fixtures use early-UTC timestamps that roll back a calendar day in US zones, so both tests failed on a Mac in a US timezone. Set process.env.TZ = 'UTC' in vitest.config.ts so every date-rendering test produces the same day on every machine. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GameRecap.test.tsxandPredictionCard.test.tsxfailed on a clean checkout ofmainin any US timezone: both components format timestamps withtoLocaleDateStringin local time, and their fixtures (2026-07-20T04:00:00Z,2025-11-28T09:10:00+00:00) roll back a calendar day outside UTC.vitest.config.ts:process.env.TZ = 'UTC'before the config export. Workers inherit it, so every date-rendering test is deterministic across machines and CI, not just these two. No component or fixture changes.Test plan
npx vitest run src/components/game/__tests__/GameRecap.test.tsx src/components/game/__tests__/PredictionCard.test.tsxpassesTZ=America/Chicagoforced in the shellnpm run testpasses (150 files, 1603 tests)🤖 Generated with Claude Code
Greptile Summary
Summary
Confidence Score: 5/5
Safe to merge; the timezone pin fixes the demonstrated date-rendering variance without changing application behavior.
No confirmed findings remain.
Files Needing Attention: None.
What T-Rex did
Reviews (1): Last reviewed commit: "Pin vitest timezone to UTC for determini..." | Re-trigger Greptile