mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix missing di in RoleBindingDialog tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
65ccc8f02e
commit
7755385793
@ -19,16 +19,20 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { render } from "@testing-library/react";
|
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||||
|
import { renderFor, DiRender } from "../../../test-utils/renderFor";
|
||||||
import { clusterRolesStore } from "../../+cluster-roles/store";
|
import { clusterRolesStore } from "../../+cluster-roles/store";
|
||||||
import { ClusterRole } from "../../../../../common/k8s-api/endpoints";
|
import { ClusterRole } from "../../../../../common/k8s-api/endpoints";
|
||||||
import { RoleBindingDialog } from "../dialog";
|
import { RoleBindingDialog } from "../dialog";
|
||||||
|
|
||||||
|
|
||||||
jest.mock("../../+cluster-roles/store");
|
jest.mock("../../+cluster-roles/store");
|
||||||
|
|
||||||
describe("RoleBindingDialog tests", () => {
|
describe("RoleBindingDialog tests", () => {
|
||||||
|
let render: DiRender;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
(clusterRolesStore as any).items = [new ClusterRole({
|
(clusterRolesStore as any).items = [new ClusterRole({
|
||||||
apiVersion: "rbac.authorization.k8s.io/v1",
|
apiVersion: "rbac.authorization.k8s.io/v1",
|
||||||
@ -39,6 +43,10 @@ describe("RoleBindingDialog tests", () => {
|
|||||||
uid: "1",
|
uid: "1",
|
||||||
},
|
},
|
||||||
})];
|
})];
|
||||||
|
|
||||||
|
const di = getDiForUnitTesting();
|
||||||
|
|
||||||
|
render = renderFor(di);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user