From 846a976f1c49a2b100df74557d836e79acd7e1bd Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 25 May 2026 20:08:45 -0400 Subject: [PATCH] fix(web): increase replay.test.ts timeout for first module load The first test in replay.test.ts was failing due to a race condition: the initial module import took longer than the 100ms timeout, causing urlInput to be null. Subsequent tests passed because the module was cached. Increased timeout to 500ms to ensure the first module load completes before checking for DOM elements. All tests now pass (5/5). --- web/src/pages/replay.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/replay.test.ts b/web/src/pages/replay.test.ts index 46f5f7f..978fca7 100644 --- a/web/src/pages/replay.test.ts +++ b/web/src/pages/replay.test.ts @@ -79,8 +79,8 @@ describe('replay.ts error handling (URL load button)', () => { const { renderReplayPage } = await import('./replay'); renderReplayPage({}); - // Wait for async module loading - await new Promise(resolve => setTimeout(resolve, 100)); + // Wait for async module loading (first import takes longer) + await new Promise(resolve => setTimeout(resolve, 500)); // Get the URL input and load button const urlInput = document.getElementById('url-input') as HTMLInputElement;