-
Notifications
You must be signed in to change notification settings - Fork 191
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
Expose launched chrome child process object. #67
Conversation
Some users may want/need access to the underlying child process as generated from the spawn command, so expose it when launching chrome. Also add a test to make sure that the interface that we return does not have undefined values set.
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
chrome-launcher.ts
Outdated
@@ -94,7 +96,7 @@ class Launcher { | |||
private requestedPort?: number; | |||
private connectionPollInterval: number; | |||
private maxConnectionRetries: number; | |||
private chrome?: childProcess.ChildProcess; | |||
public chrome?: childProcess.ChildProcess; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg. seems like we can also add private/public/public to the props on L105-107?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh good catch, public is actually not-needed since when omitted it is the default. I will drop it from here.
chrome-launcher.ts
Outdated
@@ -79,7 +81,7 @@ async function launch(opts: Options = {}): Promise<LaunchedChrome> { | |||
return instance.kill(); | |||
}; | |||
|
|||
return {pid: instance.pid!, port: instance.port!, kill}; | |||
return {pid: instance.pid!, port: instance.port!, kill, chromeProcess: instance.chrome!}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename this guy to just process
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 will do thanks for the review!
Some users may want/need access to the underlying child process as
generated from the spawn command, so expose it when launching chrome.
Also add a test to make sure that the interface that we return does not
have undefined values set.
This PR is from #40 but cleaned up so that we can land it.
fixes #7