We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfb621e commit 8ce8683Copy full SHA for 8ce8683
playground/html/__tests__/html.spec.ts
@@ -7,6 +7,7 @@ import {
7
isBuild,
8
isServe,
9
page,
10
+ untilBrowserLogAfter,
11
viteServer,
12
viteTestUrl,
13
withRetry,
@@ -298,8 +299,11 @@ describe.runIf(isServe)('invalid', () => {
298
299
})
300
301
test('should reload when fixed', async () => {
- await page.goto(viteTestUrl + '/invalid.html')
302
- await editFile('invalid.html', (content) => {
+ await untilBrowserLogAfter(
303
+ () => page.goto(viteTestUrl + '/invalid.html'),
304
+ /connected/, // wait for HMR connection
305
+ )
306
+ editFile('invalid.html', (content) => {
307
return content.replace('<div Bad', '<div> Good')
308
309
const content = await page.waitForSelector('text=Good HTML')
0 commit comments