diff --git a/package.json b/package.json index 7697cf8201..a30388587f 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "tar": "^6.0.5", "tcp-port-used": "^1.0.1", "tempy": "^0.5.0", - "url-parse": "^1.4.7", + "url-parse": "^1.5.1", "uuid": "^8.3.2", "win-ca": "^3.2.0", "winston": "^3.2.1", diff --git a/src/main/protocol-handler/__test__/router.test.ts b/src/main/protocol-handler/__test__/router.test.ts index 408fde02aa..750ccef7cc 100644 --- a/src/main/protocol-handler/__test__/router.test.ts +++ b/src/main/protocol-handler/__test__/router.test.ts @@ -1,11 +1,12 @@ -import { LensProtocolRouterMain } from "../router"; -import { noop } from "../../../common/utils"; -import { ExtensionsStore } from "../../../extensions/extensions-store"; -import { ExtensionLoader } from "../../../extensions/extension-loader"; import * as uuid from "uuid"; -import { LensMainExtension } from "../../../extensions/core-api"; + import { broadcastMessage } from "../../../common/ipc"; import { ProtocolHandlerExtension, ProtocolHandlerInternal } from "../../../common/protocol-handler"; +import { noop } from "../../../common/utils"; +import { LensMainExtension } from "../../../extensions/core-api"; +import { ExtensionLoader } from "../../../extensions/extension-loader"; +import { ExtensionsStore } from "../../../extensions/extensions-store"; +import { LensProtocolRouterMain } from "../router"; jest.mock("../../../common/ipc"); @@ -54,7 +55,7 @@ describe("protocol router tests", () => { } }); - it("should not throw when has valid host", async () => { + it.only("should not throw when has valid host", async () => { const extId = uuid.v4(); const ext = new LensMainExtension({ id: extId, @@ -85,14 +86,13 @@ describe("protocol router tests", () => { expect(throwIfDefined(error)).not.toThrow(); } - try { expect(await lpr.route("lens://extension/@mirantis/minikube")).toBeUndefined(); } catch (error) { expect(throwIfDefined(error)).not.toThrow(); } - expect(broadcastMessage).toHaveBeenNthCalledWith(1, ProtocolHandlerInternal, "lens://app"); + expect(broadcastMessage).toHaveBeenNthCalledWith(1, ProtocolHandlerInternal, "lens://app/"); expect(broadcastMessage).toHaveBeenNthCalledWith(2, ProtocolHandlerExtension, "lens://extension/@mirantis/minikube"); }); diff --git a/yarn.lock b/yarn.lock index e63509abfb..42391e5c92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14089,10 +14089,10 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.4.3, url-parse@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" - integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== +url-parse@^1.4.3, url-parse@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" + integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== dependencies: querystringify "^2.1.1" requires-port "^1.0.0"