mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
ba568e33ca
commit
b953022c47
@ -43,27 +43,6 @@ describe("CatalogEntityRegistry", () => {
|
|||||||
expect(catalog.items.length).toEqual(2);
|
expect(catalog.items.length).toEqual(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("ignores unknown items", () => {
|
|
||||||
const catalog = new CatalogEntityRegistry(catalogCategoryRegistry);
|
|
||||||
const items = [{
|
|
||||||
apiVersion: "entity.k8slens.dev/v1alpha1",
|
|
||||||
kind: "FooBar",
|
|
||||||
metadata: {
|
|
||||||
uid: "123",
|
|
||||||
name: "foobar",
|
|
||||||
source: "test",
|
|
||||||
labels: {}
|
|
||||||
},
|
|
||||||
status: {
|
|
||||||
phase: "disconnected"
|
|
||||||
},
|
|
||||||
spec: {}
|
|
||||||
}];
|
|
||||||
|
|
||||||
catalog.updateItems(items);
|
|
||||||
expect(catalog.items.length).toEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("updates existing items", () => {
|
it("updates existing items", () => {
|
||||||
const catalog = new CatalogEntityRegistry(catalogCategoryRegistry);
|
const catalog = new CatalogEntityRegistry(catalogCategoryRegistry);
|
||||||
const items = [{
|
const items = [{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user