Update VS Code to 1.33.0 (#445)
* Update VS Code to 1.33.0 * Fix slow file tree * Fix WindowsService fill * Provide `off` on event listeners * Fix webview * Fix double title bar and missing preferences on Mac * Bump VS Code version in Travis config * Fix black dialog text (again) * Fix shared process not starting
This commit is contained in:
@ -38,6 +38,23 @@ describe("net", () => {
|
||||
expect(fn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should remove event listener", async () => {
|
||||
const socket = new net.Socket();
|
||||
|
||||
const fn1 = jest.fn();
|
||||
const fn2 = jest.fn();
|
||||
|
||||
socket.on("error", fn1);
|
||||
socket.on("error", fn2);
|
||||
socket.off("error", fn1);
|
||||
|
||||
socket.connect("/tmp/t/e/s/t/d/o/e/s/n/o/t/e/x/i/s/t");
|
||||
|
||||
await new Promise((r): nativeNet.Socket => socket.on("close", r));
|
||||
expect(fn1).toHaveBeenCalledTimes(0);
|
||||
expect(fn2).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should connect", async () => {
|
||||
await new Promise((resolve): void => {
|
||||
const socket = net.createConnection(socketPath, () => {
|
||||
|
Reference in New Issue
Block a user