Skip to content

fix(test): Fix flaky React Native metrics onboarding test#111846

Closed
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-react-native-metrics-spec
Closed

fix(test): Fix flaky React Native metrics onboarding test#111846
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-react-native-metrics-spec

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

Summary

  • Increase the Jest test timeout from the default 5s to 10s for the React Native metrics onboarding spec
  • The test renders MetricsTabOnboarding which triggers a dynamic import() of the docs module, two API calls (/keys/ and /sdks/), and multiple userEvent.click interactions with findBy queries
  • On slow CI machines these async operations can collectively exceed the default 5000ms Jest timeout, causing intermittent failures (2 occurrences in last 30 days)

Test plan

  • Pre-commit hooks pass (ESLint, format, stylelint, etc.)
  • CI passes on the changed test file

Made with Cursor

Increase the test timeout from the default 5s to 10s. The test renders
MetricsTabOnboarding which triggers a dynamic import of the docs module,
two API calls, and multiple user interactions. On slow CI machines these
async operations can collectively exceed the 5s default.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Made-with: Cursor
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 30, 2026
@JoshuaKGoldberg JoshuaKGoldberg deleted the fix/flaky-react-native-metrics-spec branch March 31, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant