Skip to content

Commit

Permalink
fix: wait a little for console to flush before teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
stagas committed Feb 4, 2022
1 parent 4dbae6a commit fe6ce0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const runInClient = async (setup: ClientSetup, fn: () => unknown) => {
const browser = await puppeteer.launch(setup.launchOptions)

const close = async () => {
// wait for console to flush
await new Promise(resolve => setTimeout(resolve, 20))

await browser.close()
await server.close()
}
Expand Down

0 comments on commit fe6ce0e

Please sign in to comment.