mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
e939968470
commit
6fd2d0b3b3
@ -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: "",
|
||||
|
||||
@ -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();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user