Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test: give async assertions a realistic budget on CI

Maurice16922766e5e3
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(),