Skip to content

[website] Fix test failing locally#681

Merged
byronkarlen merged 1 commit into
mainfrom
byron/tsconfig_and_eslint_cleanup
May 20, 2026
Merged

[website] Fix test failing locally#681
byronkarlen merged 1 commit into
mainfrom
byron/tsconfig_and_eslint_cleanup

Conversation

@byronkarlen
Copy link
Copy Markdown
Contributor

@byronkarlen byronkarlen commented May 8, 2026

Why

FileListEntry.test.tsx fails locally but passes on Linux CI. The test indirectly captures KeyMap.Meta's integer value, which KeybindingsManager.tsx derives from navigator.platform at module load. Jest's node test environment historically had no globalThis.navigator, so the snapshot was recorded with the non-Mac value. Node 21+ now exposes a built-in globalThis.navigator whose platform reflects the host OS, so on Macs the the snapshot mismatches.

How

Stub globalThis.navigator injest/unit.setup.js with a fixed non-Mac value so snapshot stays deterministic across hosts.

Test Plan

Tests pass.

Copy link
Copy Markdown
Contributor Author

byronkarlen commented May 8, 2026

@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from e7e34f6 to 92ad220 Compare May 8, 2026 21:28
@byronkarlen byronkarlen changed the title tsconfig and eslint cleanup [website] Make navigator deterministic in jest setup May 8, 2026
@byronkarlen byronkarlen changed the title [website] Make navigator deterministic in jest setup [website] Fix local test May 8, 2026
@byronkarlen byronkarlen changed the title [website] Fix local test [website] Fix test failing locally May 8, 2026
@byronkarlen byronkarlen marked this pull request as ready for review May 8, 2026 23:51
@byronkarlen byronkarlen requested a review from byCedric as a code owner May 8, 2026 23:51
@byronkarlen byronkarlen changed the base branch from main to graphite-base/681 May 11, 2026 15:39
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 92ad220 to 5fbee17 Compare May 11, 2026 15:40
@byronkarlen byronkarlen changed the base branch from graphite-base/681 to byron/_website_read_local_expo_auth_cookie_in_development May 11, 2026 15:40
@byronkarlen byronkarlen force-pushed the byron/_website_read_local_expo_auth_cookie_in_development branch 2 times, most recently from 2dc6a9c to a85a52c Compare May 11, 2026 16:26
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 5fbee17 to 12fcfeb Compare May 11, 2026 16:26
@byronkarlen byronkarlen changed the base branch from byron/_website_read_local_expo_auth_cookie_in_development to graphite-base/681 May 11, 2026 16:34
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 12fcfeb to 711ee44 Compare May 11, 2026 16:34
@graphite-app graphite-app Bot changed the base branch from graphite-base/681 to main May 11, 2026 16:35
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch 3 times, most recently from c81b819 to 012c054 Compare May 12, 2026 18:43
@byronkarlen byronkarlen changed the base branch from main to graphite-base/681 May 18, 2026 20:19
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 012c054 to a3fcfaa Compare May 18, 2026 20:19
@byronkarlen byronkarlen changed the base branch from graphite-base/681 to byron/_snack-sdk_website_move_to_cookie-based_auth May 18, 2026 20:20
@byronkarlen byronkarlen force-pushed the byron/_snack-sdk_website_move_to_cookie-based_auth branch 2 times, most recently from 3ab9305 to 9c00c29 Compare May 20, 2026 18:38
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from a3fcfaa to 3644aa4 Compare May 20, 2026 18:38
@byronkarlen byronkarlen changed the base branch from byron/_snack-sdk_website_move_to_cookie-based_auth to graphite-base/681 May 20, 2026 20:59
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 3644aa4 to 1ad7983 Compare May 20, 2026 20:59
@graphite-app graphite-app Bot changed the base branch from graphite-base/681 to main May 20, 2026 21:00
@byronkarlen byronkarlen force-pushed the byron/tsconfig_and_eslint_cleanup branch from 1ad7983 to 2732168 Compare May 20, 2026 21:00
@byronkarlen byronkarlen merged commit 2f0469f into main May 20, 2026
6 checks passed
@byronkarlen byronkarlen deleted the byron/tsconfig_and_eslint_cleanup branch May 20, 2026 21:26
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