From 2218099ad3f3c600dd226b3d958eb5605a169b56 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 7 Jun 2023 15:59:31 +0800 Subject: [PATCH] test(hmr): remove timeout causing flakiness (#13449) --- playground/hmr/__tests__/hmr.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts index 274c78a1d04c72..163931724470a0 100644 --- a/playground/hmr/__tests__/hmr.spec.ts +++ b/playground/hmr/__tests__/hmr.spec.ts @@ -712,20 +712,19 @@ if (!isBuild) { const file = 'missing-import/a.js' const importCode = "import 'missing-modules'" const unImportCode = `// ${importCode}` - const timeout = 2000 await page.goto(viteTestUrl + '/missing-import/index.html', { waitUntil: 'load', }) await untilBrowserLogAfter(async () => { - const loadPromise = page.waitForEvent('load', { timeout }) + const loadPromise = page.waitForEvent('load') editFile(file, (code) => code.replace(importCode, unImportCode)) await loadPromise }, 'missing test') await untilBrowserLogAfter(async () => { - const loadPromise = page.waitForEvent('load', { timeout }) + const loadPromise = page.waitForEvent('load') editFile(file, (code) => code.replace(unImportCode, importCode)) await loadPromise }, /500/)