1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Move crd into beforeEach

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-05-31 08:41:10 -04:00
parent 750cbfbff4
commit 7220edac41

View File

@ -21,7 +21,10 @@ describe("<CustomResourceDetails />", () => {
}); });
describe("with a CRD with a boolean field", () => { describe("with a CRD with a boolean field", () => {
const crd = new CustomResourceDefinition({ let crd: CustomResourceDefinition;
beforeEach(() => {
crd = new CustomResourceDefinition({
apiVersion: "apiextensions.k8s.io/v1", apiVersion: "apiextensions.k8s.io/v1",
kind: "CustomResourceDefinition", kind: "CustomResourceDefinition",
metadata: { metadata: {
@ -66,6 +69,7 @@ describe("<CustomResourceDetails />", () => {
scope: "Cluster", scope: "Cluster",
}, },
}); });
});
it("should display false in an additionalPrinterColumn as 'false'", () => { it("should display false in an additionalPrinterColumn as 'false'", () => {
const cr = new KubeObject({ const cr = new KubeObject({
@ -109,7 +113,10 @@ describe("<CustomResourceDetails />", () => {
}); });
describe("with a CRD with a number field", () => { describe("with a CRD with a number field", () => {
const crd = new CustomResourceDefinition({ let crd: CustomResourceDefinition;
beforeEach(() => {
crd = new CustomResourceDefinition({
apiVersion: "apiextensions.k8s.io/v1", apiVersion: "apiextensions.k8s.io/v1",
kind: "CustomResourceDefinition", kind: "CustomResourceDefinition",
metadata: { metadata: {
@ -154,6 +161,7 @@ describe("<CustomResourceDetails />", () => {
scope: "Cluster", scope: "Cluster",
}, },
}); });
});
it("should display 0 in an additionalPrinterColumn as '0'", () => { it("should display 0 in an additionalPrinterColumn as '0'", () => {
const cr = new KubeObject({ const cr = new KubeObject({