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

Remove redundant kludge for waiting till next tick for not being needed anymore in jest 28

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-06-14 15:54:43 +03:00
parent 8f248a7f23
commit 8c334c90cf
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
5 changed files with 10 additions and 13 deletions

View File

@ -37,8 +37,8 @@ describe("extensions - navigation using application menu", () => {
});
describe("when navigating to extensions using application menu", () => {
beforeEach(async () => {
await applicationBuilder.applicationMenu.click("root.extensions");
beforeEach(() => {
applicationBuilder.applicationMenu.click("root.extensions");
});
it("focuses the window", () => {

View File

@ -28,8 +28,8 @@ describe("preferences - navigation using application menu", () => {
});
describe("when navigating to preferences using application menu", () => {
beforeEach(async () => {
await applicationBuilder.applicationMenu.click("root.preferences");
beforeEach(() => {
applicationBuilder.applicationMenu.click("root.preferences");
});
it("renders", () => {

View File

@ -49,8 +49,8 @@ describe("quitting the app using application menu", () => {
});
describe("when application is quit", () => {
beforeEach(async () => {
await applicationBuilder.applicationMenu.click("root.quit");
beforeEach(() => {
applicationBuilder.applicationMenu.click("root.quit");
});
it("closes all windows", () => {

View File

@ -28,8 +28,8 @@ describe("welcome - navigation using application menu", () => {
});
describe("when navigating to welcome using application menu", () => {
beforeEach(async () => {
await applicationBuilder.applicationMenu.click("help.welcome");
beforeEach(() => {
applicationBuilder.applicationMenu.click("help.welcome");
});
it("renders", () => {

View File

@ -39,7 +39,6 @@ import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
import clusterFrameContextInjectable from "../../cluster-frame-context/cluster-frame-context.injectable";
import startMainApplicationInjectable from "../../../main/start-main-application/start-main-application.injectable";
import startFrameInjectable from "../../start-frame/start-frame.injectable";
import { flushPromises } from "../../../common/test-utils/flush-promises";
import type { NamespaceStore } from "../+namespaces/store";
import namespaceStoreInjectable from "../+namespaces/store.injectable";
import historyInjectable from "../../navigation/history.injectable";
@ -76,7 +75,7 @@ export interface ApplicationBuilder {
};
applicationMenu: {
click: (path: string) => Promise<void>;
click: (path: string) => void;
};
preferences: {
@ -207,7 +206,7 @@ export const getApplicationBuilder = () => {
dis,
applicationMenu: {
click: async (path: string) => {
click: (path: string) => {
const applicationMenuItems = mainDi.inject(
applicationMenuItemsInjectable,
);
@ -238,8 +237,6 @@ export const getApplicationBuilder = () => {
undefined,
{},
);
await flushPromises();
},
},