From 8f026fa041b08a159aa78424798340110314502a Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Thu, 14 May 2026 12:33:25 -0700 Subject: [PATCH] =?UTF-8?q?Also=20bump=20the=20`waitFor`=20timeout=20?= =?UTF-8?q?=E2=80=94=20`testTimeout`=20alone=20isn't=20enough?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/graphiql/src/GraphiQL.spec.tsx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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 () => {