mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify a test
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
3d35ba5c24
commit
3add4255cf
@ -2,7 +2,6 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||
import populateApplicationMenuInjectable from "./main/populate-application-menu.injectable";
|
||||
@ -10,7 +9,6 @@ import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-t
|
||||
|
||||
describe("application-menu", () => {
|
||||
let builder: ApplicationBuilder;
|
||||
let mainDi: DiContainer;
|
||||
let populateApplicationMenuMock: jest.Mock;
|
||||
|
||||
beforeEach(async () => {
|
||||
@ -21,13 +19,13 @@ describe("application-menu", () => {
|
||||
builder = getApplicationBuilder();
|
||||
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
mainDi.override(populateApplicationMenuInjectable, () => populateApplicationMenuMock);
|
||||
mainDi.override(
|
||||
populateApplicationMenuInjectable,
|
||||
() => populateApplicationMenuMock,
|
||||
);
|
||||
});
|
||||
|
||||
// await builder.render();
|
||||
await builder.startHidden();
|
||||
|
||||
mainDi = builder.mainDi;
|
||||
});
|
||||
|
||||
it("when insufficient time passes, does not populate menu items yet", () => {
|
||||
@ -42,7 +40,9 @@ describe("application-menu", () => {
|
||||
});
|
||||
|
||||
it("populates application menu", () => {
|
||||
expect(populateApplicationMenuMock).toHaveBeenCalledWith(expect.any(Array));
|
||||
expect(populateApplicationMenuMock).toHaveBeenCalledWith(
|
||||
expect.any(Array),
|
||||
);
|
||||
});
|
||||
|
||||
it("populates application menu lol", () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user