mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
02e77afcd1
commit
c6dce043a7
406 files changed
+1590
-1580
No files matched your search
@@ -39,7 +39,7 @@ describe("extension compatibility", () => {
|
||||
it("has no extension comparator", () => {
|
||||
const manifest = { name: "extensionName", version: "0.0.1" };
|
||||
|
||||
expect(isCompatibleExtension(manifest,)).toBe(false);
|
||||
expect(isCompatibleExtension(manifest)).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
@@ -78,7 +78,7 @@ describe("extension compatibility", () => {
|
||||
])("extension comparator test: %p", ({ comparator, expected }) => {
|
||||
const manifest: LensExtensionManifest = { name: "extensionName", version: "0.0.1", engines: { lens: comparator }};
|
||||
|
||||
expect(isCompatibleExtension(manifest,)).toBe(expected);
|
||||
expect(isCompatibleExtension(manifest)).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,7 +93,7 @@ describe("extension compatibility", () => {
|
||||
it("has no extension comparator", () => {
|
||||
const manifest = { name: "extensionName", version: "0.0.1" };
|
||||
|
||||
expect(isCompatibleExtension(manifest,)).toBe(false);
|
||||
expect(isCompatibleExtension(manifest)).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
@@ -132,7 +132,7 @@ describe("extension compatibility", () => {
|
||||
])("extension comparator test: %p", ({ comparator, expected }) => {
|
||||
const manifest: LensExtensionManifest = { name: "extensionName", version: "0.0.1", engines: { lens: comparator }};
|
||||
|
||||
expect(isCompatibleExtension(manifest,)).toBe(expected);
|
||||
expect(isCompatibleExtension(manifest)).toBe(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -32,13 +32,13 @@ jest.setTimeout(60_000);
|
||||
|
||||
jest.mock("../../common/ipc");
|
||||
jest.mock("chokidar", () => ({
|
||||
watch: jest.fn()
|
||||
watch: jest.fn(),
|
||||
}));
|
||||
jest.mock("../extension-installer", () => ({
|
||||
extensionInstaller: {
|
||||
extensionPackagesRoot: "",
|
||||
installPackage: jest.fn()
|
||||
}
|
||||
installPackage: jest.fn(),
|
||||
},
|
||||
}));
|
||||
jest.mock("electron", () => ({
|
||||
app: {
|
||||
@@ -72,7 +72,7 @@ describe("ExtensionDiscovery", () => {
|
||||
beforeEach(() => {
|
||||
mockFs({
|
||||
[`${os.homedir()}/.k8slens/extensions/my-extension/package.json`]: JSON.stringify({
|
||||
name: "my-extension"
|
||||
name: "my-extension",
|
||||
}),
|
||||
});
|
||||
});
|
||||
@@ -91,11 +91,11 @@ describe("ExtensionDiscovery", () => {
|
||||
}
|
||||
|
||||
return mockWatchInstance;
|
||||
})
|
||||
}),
|
||||
};
|
||||
|
||||
mockedWatch.mockImplementationOnce(() =>
|
||||
(mockWatchInstance) as any
|
||||
(mockWatchInstance) as any,
|
||||
);
|
||||
|
||||
const extensionDiscovery = ExtensionDiscovery.createInstance();
|
||||
@@ -134,11 +134,11 @@ describe("ExtensionDiscovery", () => {
|
||||
}
|
||||
|
||||
return mockWatchInstance;
|
||||
})
|
||||
}),
|
||||
};
|
||||
|
||||
mockedWatch.mockImplementationOnce(() =>
|
||||
(mockWatchInstance) as any
|
||||
(mockWatchInstance) as any,
|
||||
);
|
||||
const extensionDiscovery = ExtensionDiscovery.createInstance();
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ jest.mock("../extensions-store", () => ({
|
||||
ExtensionsStore: {
|
||||
getInstance: () => ({
|
||||
whenLoaded: Promise.resolve(true),
|
||||
mergeState: jest.fn()
|
||||
})
|
||||
}
|
||||
mergeState: jest.fn(),
|
||||
}),
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock(
|
||||
@@ -118,13 +118,13 @@ jest.mock(
|
||||
]);
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
},
|
||||
}),
|
||||
{
|
||||
virtual: true,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
describe("ExtensionLoader", () => {
|
||||
@@ -189,11 +189,11 @@ describe("ExtensionLoader", () => {
|
||||
expect(ExtensionsStore.getInstance().mergeState).toHaveBeenCalledWith({
|
||||
"manifest/path": {
|
||||
enabled: false,
|
||||
name: "TestExtension"
|
||||
name: "TestExtension",
|
||||
},
|
||||
"manifest/path2": {
|
||||
enabled: true,
|
||||
name: "TestExtension2"
|
||||
name: "TestExtension2",
|
||||
}});
|
||||
});
|
||||
});
|
||||
@@ -32,14 +32,14 @@ describe("lens extension", () => {
|
||||
ext = new LensExtension({
|
||||
manifest: {
|
||||
name: "foo-bar",
|
||||
version: "0.1.1"
|
||||
version: "0.1.1",
|
||||
},
|
||||
id: "/this/is/fake/package.json",
|
||||
absolutePath: "/absolute/fake/",
|
||||
manifestPath: "/this/is/fake/package.json",
|
||||
isBundled: false,
|
||||
isEnabled: true,
|
||||
isCompatible: true
|
||||
isCompatible: true,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user