Skip to content

Commit 1e608ea

Browse files
Give defaults to the built-in default query test a 20s timeout (#4268)
## Summary Times out at the default 9s on every CI run since Vitest 4 landed (#4260). It's the only test in `GraphiQL.spec.tsx` that boots Monaco's `editorWorkerService` from a cold start; the rest get a warm worker. Vitest 4's pool switch from `threads` to `forks` pushed cold-boot just past 9s. Bumped to 20s on this one test, with an inline comment explaining why for the next person. Failed on two back-to-back runs of an unrelated PR: - https://github.com/graphql/graphiql/actions/runs/25878177678/job/76051305013 - https://github.com/graphql/graphiql/actions/runs/25878177678/job/76052552437
1 parent 96beec3 commit 1e608ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/graphiql/src/GraphiQL.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ describe('GraphiQL', () => {
167167
}); // schema
168168

169169
describe('default query', () => {
170+
// First test to boot Monaco's editor worker; cold start needs extra time under Vitest 4's forks pool.
170171
it('defaults to the built-in default query', async () => {
171172
const { container } = render(<GraphiQL fetcher={noOpFetcher} />);
172173

@@ -177,7 +178,7 @@ describe('GraphiQL', () => {
177178
expect(queryEditor).toBeVisible();
178179
expect(queryEditor!.textContent).toBe('# Welcome to GraphiQL');
179180
});
180-
});
181+
}, 20000);
181182

182183
it('accepts a custom default query', async () => {
183184
const { container } = render(

0 commit comments

Comments
 (0)