From 16922766e5e3235c512bea4c666fb110f36ce04c Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 29 Jul 2026 10:50:23 +0200 Subject: [PATCH] test: give async assertions a realistic budget on CI waitFor and findBy* default to 1s. That holds on a dev machine but not on a 4-core runner executing 527 test files in parallel forks, where three import dialog tests timed out waiting for their upload to settle. --- client/tests/setup.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/tests/setup.ts b/client/tests/setup.ts index 4455d6fe0..dcbe38674 100644 --- a/client/tests/setup.ts +++ b/client/tests/setup.ts @@ -1,9 +1,15 @@ import '@testing-library/jest-dom/vitest'; import 'fake-indexeddb/auto'; -import { cleanup } from '@testing-library/react'; +import { cleanup, configure } from '@testing-library/react'; import { afterAll, afterEach, beforeAll, vi } from 'vitest'; import { server } from './helpers/msw/server'; +// waitFor/findBy* default to 1s, which is enough on a dev machine but not on a +// 4-core CI runner running the whole suite in parallel forks — a multipart POST +// through MSW plus an IndexedDB write can exceed it. Still well inside the 15s +// testTimeout, so a genuinely broken assertion fails, it just takes longer. +configure({ asyncUtilTimeout: 5000 }); + // Mock the websocket module so stores don't try to open real connections vi.mock('../src/api/websocket', () => ({ connect: vi.fn(),