Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawning and killing browser and dev server in parallel? #68

Closed
JoshuaKGoldberg opened this issue May 16, 2018 · 1 comment
Closed

Spawning and killing browser and dev server in parallel? #68

JoshuaKGoldberg opened this issue May 16, 2018 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented May 16, 2018

The setup and teardown async logics run in series now. Since #66 is a little cleaner to read, code snippets from there:

// setup
browser = await puppeteer.launch(config.launch)
// (couple of other lines)
if (config.server) await setupServer(config.server)
// teardown
await teardownServer()
await browser.close()

These could be done in parallel for speed:

// setup
const tasks = [puppeteer.launch(config.launch)]
if (config.server) tasks.push(setupServer(config.server))
[browser] = await Promise.all(tasks)
// setup
await Promise.all([
    teardownServer(),
    browser.close(),
])
@gregberge
Copy link
Member

Good idea! Todo after #67 will be merged.

jnv pushed a commit to jnv/jest-dev-server that referenced this issue Sep 13, 2018
- jest-dev-server can now be used as standalone
- Used port is now automatically detected and a prompt is shown to offer you the opportunity to kill the guilty process

Closes argos-ci#66
Closes argos-ci#68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants