Skip to content

Commit

Permalink
test: fix flaky test fail (#16667)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed May 13, 2024
1 parent 76d1642 commit 65eb48f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions playground/hmr/__tests__/hmr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,13 +829,17 @@ if (!isBuild) {
'parent:not-child',
)

addFile(childFile, originalChildFileCode)
editFile(parentFile, (code) =>
code.replace(
"export const childValue = 'not-child'",
"export { value as childValue } from './child'",
),
)
await untilBrowserLogAfter(async () => {
const loadPromise = page.waitForEvent('load')
addFile(childFile, originalChildFileCode)
editFile(parentFile, (code) =>
code.replace(
"export const childValue = 'not-child'",
"export { value as childValue } from './child'",
),
)
await loadPromise
}, [/connected/])
await untilUpdated(
() => page.textContent('.file-delete-restore'),
'parent:child',
Expand Down

0 comments on commit 65eb48f

Please sign in to comment.