diff --git a/packages/graphiql/src/GraphiQL.spec.tsx b/packages/graphiql/src/GraphiQL.spec.tsx
index 485e1de1ba6..7bfcd8dd7a0 100644
--- a/packages/graphiql/src/GraphiQL.spec.tsx
+++ b/packages/graphiql/src/GraphiQL.spec.tsx
@@ -167,17 +167,22 @@ describe('GraphiQL', () => {
}); // schema
describe('default query', () => {
- // First test to boot Monaco's editor worker; cold start needs extra time under Vitest 4's forks pool.
+ // First test to boot Monaco's editor worker; cold start needs extra time under
+ // Vitest 4's forks pool. Both the it() testTimeout and the waitFor()
+ // asyncUtilTimeout (configured at 9s in setup-files.ts) must be bumped.
it('defaults to the built-in default query', async () => {
const { container } = render();
- await waitFor(() => {
- const queryEditor = container.querySelector(
- '.graphiql-editor .monaco-scrollable-element',
- );
- expect(queryEditor).toBeVisible();
- expect(queryEditor!.textContent).toBe('# Welcome to GraphiQL');
- });
+ await waitFor(
+ () => {
+ const queryEditor = container.querySelector(
+ '.graphiql-editor .monaco-scrollable-element',
+ );
+ expect(queryEditor).toBeVisible();
+ expect(queryEditor!.textContent).toBe('# Welcome to GraphiQL');
+ },
+ { timeout: 15_000 },
+ );
}, 20000);
it('accepts a custom default query', async () => {