Fix hotbar migration of workspaces (#3178)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-25 09:55:25 -04:00
1 parent b9dfd20a93
commit 51655884c7
39 files changed
+333 -446

No files matched your search

@@ -28,9 +28,17 @@ import { LensExtension } from "../../../extensions/main-api";
import { ExtensionLoader } from "../../../extensions/extension-loader";
import { ExtensionsStore } from "../../../extensions/extensions-store";
import { LensProtocolRouterMain } from "../router";
import mockFs from "mock-fs";
jest.mock("../../../common/ipc");
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",
setLoginItemSettings: jest.fn(),
},
}));
function throwIfDefined(val: any): void {
if (val != null) {
throw val;
@@ -39,6 +47,9 @@ function throwIfDefined(val: any): void {
describe("protocol router tests", () => {
beforeEach(() => {
mockFs({
"tmp": {}
});
ExtensionsStore.createInstance();
ExtensionLoader.createInstance();
@@ -53,6 +64,7 @@ describe("protocol router tests", () => {
ExtensionsStore.resetInstance();
ExtensionLoader.resetInstance();
LensProtocolRouterMain.resetInstance();
mockFs.restore();
});
it("should throw on non-lens URLS", () => {