Skip to content

Commit

Permalink
test: fix flaky should reload test fail (vitejs#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Dec 13, 2024
1 parent 388403f commit bebb87b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion playground/vue/__tests__/vue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ describe('hmr', () => {

test('should reload when relies file changed', async () => {
// rerender
editFile('Hmr.vue', (code) => code.replace('HMR', 'HMR updated'))
await untilUpdated(() => page.textContent('h2.hmr'), 'HMR updated')
editFile('Hmr.vue', (code) =>
code.replace('HMR updated', 'HMR updated updated'),
)
await untilUpdated(() => page.textContent('h2.hmr'), 'HMR updated updated')
await untilUpdated(() => page.textContent('.hmr-number'), '100')

// reload
Expand Down

0 comments on commit bebb87b

Please sign in to comment.