Skip to content

Also bump the waitFor timeout — testTimeout alone isn't enough#4270

Merged
trevor-scheer merged 1 commit into
graphql:mainfrom
trevor-scheer:trevor/vitest-monaco-waitfor-timeout
May 14, 2026
Merged

Also bump the waitFor timeout — testTimeout alone isn't enough#4270
trevor-scheer merged 1 commit into
graphql:mainfrom
trevor-scheer:trevor/vitest-monaco-waitfor-timeout

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #4268. That PR bumped testTimeout to 20s for this test but missed the second 9s ceiling: configure({ asyncUtilTimeout: 9_000 }) in packages/graphiql/setup-files.ts. RTL's waitFor gives up at the asyncUtilTimeout regardless of how big the it() timeout is — its final assertion then runs against a null queryEditor and fails with expect(...).toBeVisible() instead of the original "Test timed out" message.

Evidence the previous fix was luck-of-the-draw: #4268 passed because Monaco cold-booted at 7927ms — 73ms under the 9s cliff. #4266 failed at 9066ms on the same fix because Monaco took longer that run.

This PR adds { timeout: 15_000 } to the waitFor(...) call so the polling window matches the test's 20s ceiling. Keeps it(..., 20000) so the two timeouts don't race in the other direction.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 8f026fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@trevor-scheer trevor-scheer marked this pull request as ready for review May 14, 2026 19:42
@trevor-scheer trevor-scheer merged commit 9274396 into graphql:main May 14, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/vitest-monaco-waitfor-timeout branch May 14, 2026 19:43
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