-
Notifications
You must be signed in to change notification settings - Fork 267
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
Bubbling up close message from websocket to the extension. #89
Conversation
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.
Splitting out the close into its own event seems to make sense.
Detects if the close event has been triggered and the dispose function handled.
@@ -161,10 +161,14 @@ describe("devtoolsPanel", () => { | |||
const dtp = await import("./devtoolsPanel"); | |||
dtp.DevToolsPanel.createOrShow(context, mockTelemetry, "", mockRuntimeConfig); | |||
|
|||
expect(mockPanelSocket.on).toHaveBeenCalledTimes(Object.keys(webviewEventNames).length); | |||
expect(mockPanelSocket.on).toHaveBeenCalledTimes(Object.keys(webviewEventNames).length + 1); |
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.
Add a small comment to explain the +1 E.g. // +1 for 'close' event
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.
LGTM with a minor comment
This PR bubbles up the close message from the websocket to the extension, so when the websocket is closed the extension will be closed too.