Skip to content

Commit

Permalink
test: improve css-dynamic-import playground test code (#11174)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Dec 4, 2022
1 parent f589579 commit 509201b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ async function withServe(base: string, fn: () => Promise<void>) {
const config = getConfig(base)
const server = await createServer(config)
await server.listen()
await new Promise((r) => setTimeout(r, 500))

try {
await page.goto(server.resolvedUrls.local[0])
await fn()
} finally {
await page.goto('about:blank') // move to a different page to avoid auto-refresh after server start
await server.close()
}
}
Expand Down

0 comments on commit 509201b

Please sign in to comment.