Skip to content

Commit 097fd57

Browse files
authored
test: fix flaky tests (#10222)
1 parent ea09fde commit 097fd57

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

playground/ssr-vue/__tests__/ssr-vue.spec.ts

+12-8
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,18 @@ test('hydration', async () => {
161161
expect(await page.textContent('button')).toMatch('1')
162162
})
163163

164-
test('hmr', async () => {
165-
// This is test is flaky in Mac CI, but can't be reproduced locally. Wait until
166-
// network idle to avoid the issue. TODO: This may be caused by a bug when
167-
// modifying a file while loading, we should remove this guard
168-
await page.goto(url, { waitUntil: 'networkidle' })
169-
editFile('src/pages/Home.vue', (code) => code.replace('Home', 'changed'))
170-
await untilUpdated(() => page.textContent('h1'), 'changed')
171-
})
164+
test(
165+
'hmr',
166+
async () => {
167+
// This is test is flaky in Mac CI, but can't be reproduced locally. Wait until
168+
// network idle to avoid the issue. TODO: This may be caused by a bug when
169+
// modifying a file while loading, we should remove this guard
170+
await page.goto(url, { waitUntil: 'networkidle' })
171+
editFile('src/pages/Home.vue', (code) => code.replace('Home', 'changed'))
172+
await untilUpdated(() => page.textContent('h1'), 'changed')
173+
},
174+
{ retry: 3 }
175+
)
172176

173177
test('client navigation', async () => {
174178
await page.goto(url)

0 commit comments

Comments
 (0)