mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make linter happy
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
64683a8a86
commit
2b19930f57
@ -9,4 +9,4 @@ describe("Timezones", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
@ -8,4 +8,4 @@ module.exports = async () => {
|
|||||||
process.env.TZ = "UTC";
|
process.env.TZ = "UTC";
|
||||||
};
|
};
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
@ -134,4 +134,4 @@ export async function checkForUpdates(): Promise<void> {
|
|||||||
|
|
||||||
export function quitAndInstallUpdate() {
|
export function quitAndInstallUpdate() {
|
||||||
autoUpdater.quitAndInstall(true, true);
|
autoUpdater.quitAndInstall(true, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ describe("app-update-warning", () => {
|
|||||||
if (event === "update-available") {
|
if (event === "update-available") {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
} as never));
|
} as never));
|
||||||
|
|
||||||
di.override(sessionStorageInjectable, () => ({
|
di.override(sessionStorageInjectable, () => ({
|
||||||
@ -90,7 +90,7 @@ describe("app-update-warning", () => {
|
|||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
jest.useRealTimers();
|
jest.useRealTimers();
|
||||||
})
|
});
|
||||||
|
|
||||||
it(`returns light warning level if date is ${date}`, () => {
|
it(`returns light warning level if date is ${date}`, () => {
|
||||||
expect(appUpdateWarning.warningLevel).toBe("light");
|
expect(appUpdateWarning.warningLevel).toBe("light");
|
||||||
@ -105,7 +105,7 @@ describe("app-update-warning", () => {
|
|||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
jest.useRealTimers();
|
jest.useRealTimers();
|
||||||
})
|
});
|
||||||
|
|
||||||
it(`returns medium warning level if date is ${date}`, () => {
|
it(`returns medium warning level if date is ${date}`, () => {
|
||||||
expect(appUpdateWarning.warningLevel).toBe("medium");
|
expect(appUpdateWarning.warningLevel).toBe("medium");
|
||||||
@ -120,7 +120,7 @@ describe("app-update-warning", () => {
|
|||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
jest.useRealTimers();
|
jest.useRealTimers();
|
||||||
})
|
});
|
||||||
|
|
||||||
it(`returns medium warning level if date is ${date}`, () => {
|
it(`returns medium warning level if date is ${date}`, () => {
|
||||||
expect(appUpdateWarning.warningLevel).toBe("high");
|
expect(appUpdateWarning.warningLevel).toBe("high");
|
||||||
@ -138,7 +138,7 @@ describe("app-update-warning", () => {
|
|||||||
|
|
||||||
appUpdateWarning = di.inject(appUpdateWarningInjectable);
|
appUpdateWarning = di.inject(appUpdateWarningInjectable);
|
||||||
appUpdateWarning.init();
|
appUpdateWarning.init();
|
||||||
})
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.useRealTimers();
|
jest.useRealTimers();
|
||||||
@ -146,6 +146,7 @@ describe("app-update-warning", () => {
|
|||||||
|
|
||||||
it("calls setInterval with correct arguments", () => {
|
it("calls setInterval with correct arguments", () => {
|
||||||
const onceADay = 1000 * 60 * 60 * 24;
|
const onceADay = 1000 * 60 * 60 * 24;
|
||||||
|
|
||||||
expect(setInterval).toHaveBeenCalledTimes(1);
|
expect(setInterval).toHaveBeenCalledTimes(1);
|
||||||
expect(setInterval).toHaveBeenCalledWith(expect.any(Function), onceADay);
|
expect(setInterval).toHaveBeenCalledWith(expect.any(Function), onceADay);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { Icon } from "../../icon";
|
|||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
import { ipcRendererOn } from "../../../../common/ipc";
|
import { ipcRendererOn } from "../../../../common/ipc";
|
||||||
import { watchHistoryState } from "../../../remote-helpers/history-updater";
|
import { watchHistoryState } from "../../../remote-helpers/history-updater";
|
||||||
import { cssNames, noop } from "../../../utils";
|
import { cssNames } from "../../../utils";
|
||||||
import topBarItemsInjectable from "./top-bar-items/top-bar-items.injectable";
|
import topBarItemsInjectable from "./top-bar-items/top-bar-items.injectable";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import type { TopBarRegistration } from "./top-bar-registration";
|
import type { TopBarRegistration } from "./top-bar-registration";
|
||||||
|
|||||||
@ -10,7 +10,8 @@ import "@testing-library/jest-dom/extend-expect";
|
|||||||
import type { DiContainer } from "@ogre-tools/injectable";
|
import type { DiContainer } from "@ogre-tools/injectable";
|
||||||
import appUpdateWarningLevelInjectable from "../../../app-update-warning/app-update-warning-level.injectable";
|
import appUpdateWarningLevelInjectable from "../../../app-update-warning/app-update-warning-level.injectable";
|
||||||
import { computed } from "mobx";
|
import { computed } from "mobx";
|
||||||
import { DiRender, renderFor } from "../../test-utils/renderFor";
|
import type { DiRender } from "../../test-utils/renderFor";
|
||||||
|
import { renderFor } from "../../test-utils/renderFor";
|
||||||
import updateAppInjectable from "../update-app.injectable";
|
import updateAppInjectable from "../update-app.injectable";
|
||||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ describe("<UpdateButton/>", () => {
|
|||||||
|
|
||||||
it("should call update function when menu item clicked", () => {
|
it("should call update function when menu item clicked", () => {
|
||||||
const update = jest.fn();
|
const update = jest.fn();
|
||||||
|
|
||||||
di.override(appUpdateWarningLevelInjectable, () => computed(() => "light"));
|
di.override(appUpdateWarningLevelInjectable, () => computed(() => "light"));
|
||||||
di.override(updateAppInjectable, update);
|
di.override(updateAppInjectable, update);
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { AutoUpdateQuitAndInstalledChannel } from "../../../common/ipc";
|
import { AutoUpdateQuitAndInstalledChannel } from "../../../common/ipc/update-available";
|
||||||
import broadcastMessageInjectable from "../../../common/ipc/broadcast-message.injectable";
|
import broadcastMessageInjectable from "../../../common/ipc/broadcast-message.injectable";
|
||||||
|
|
||||||
const updateAppInjectable = getInjectable({
|
const updateAppInjectable = getInjectable({
|
||||||
@ -17,4 +17,4 @@ const updateAppInjectable = getInjectable({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default updateAppInjectable;
|
export default updateAppInjectable;
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
|
|
||||||
const sessionStorageInjectable = getInjectable({
|
const sessionStorageInjectable = getInjectable({
|
||||||
id: "session-storage",
|
id: "session-storage",
|
||||||
instantiate: () => window.sessionStorage,
|
instantiate: () => window.sessionStorage,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default sessionStorageInjectable;
|
export default sessionStorageInjectable;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user