diff --git a/src/common/k8s-api/__tests__/helm-charts.api.test.ts b/src/common/k8s-api/__tests__/helm-charts.api.test.ts index dbe477d333..283c5168f5 100644 --- a/src/common/k8s-api/__tests__/helm-charts.api.test.ts +++ b/src/common/k8s-api/__tests__/helm-charts.api.test.ts @@ -36,13 +36,6 @@ describe("HelmChart tests", () => { version: "!", repo: "!", } as any)).toThrowError('"created" is required'); - expect(() => HelmChart.create({ - apiVersion: "!", - name: "!", - version: "!", - repo: "!", - created: "!", - } as any)).toThrowError('"digest" is required'); }); it("should throw on fields being wrong type", () => { @@ -62,6 +55,14 @@ describe("HelmChart tests", () => { created: "!", digest: "!", } as any)).toThrowError('"name" must be a string'); + expect(() => HelmChart.create({ + apiVersion: "!", + name: "!", + version: "!", + repo: "!", + created: "!", + digest: 1, + } as any)).toThrowError('"digest" must be a string'); expect(() => HelmChart.create({ apiVersion: "1", name: "", diff --git a/src/common/k8s-api/__tests__/helm-charts.test.ts b/src/common/k8s-api/__tests__/helm-charts.test.ts deleted file mode 100644 index f8c3526afb..0000000000 --- a/src/common/k8s-api/__tests__/helm-charts.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) OpenLens Authors. All rights reserved. - * Licensed under MIT License. See LICENSE in root directory for more information. - */ - -import { HelmChart } from "../endpoints/helm-charts.api"; - -describe("Helm Charts", () => { - it("should accept a helm chart without a digest field", () => { - expect(() => HelmChart.create({ - apiVersion: "foo", - name: "bar", - version: "1.0.0", - repo: "localhost:9090", - created: "yesterday", - description: "my bar chart", - keywords: ["test"], - sources: [], - urls: [], - annotations: {}, - dependencies: [], - maintainers: [], - deprecated: false, - })).not.toThrowError(); - }); -});