mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Replace jest.mock's with overriding dependencies (#6014)
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
03d2389f01
commit
81f7bd3c2c
50 files changed
+788
-605
No files matched your search
@@ -4,17 +4,20 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import { SecretDetails } from "../secret-details";
|
||||
import { Secret, SecretType } from "../../../../common/k8s-api/endpoints";
|
||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||
import { renderFor } from "../../test-utils/renderFor";
|
||||
|
||||
jest.mock("../../kube-object-meta/kube-object-meta", () => ({
|
||||
KubeObjectMeta: () => null,
|
||||
}));
|
||||
|
||||
|
||||
describe("SecretDetails tests", () => {
|
||||
it("should show the visibility toggle when the secret value is ''", () => {
|
||||
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||
const render = renderFor(di);
|
||||
|
||||
const secret = new Secret({
|
||||
apiVersion: "v1",
|
||||
kind: "secret",
|
||||
|
||||
Reference in new issue
Block a user