Skip to content

Commit

Permalink
test(hmr): remove timeout causing flakiness (#13449)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jun 7, 2023
1 parent f201805 commit 2218099
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions playground/hmr/__tests__/hmr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down

0 comments on commit 2218099

Please sign in to comment.