mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix test failures due to incomplete overrides
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
4875f24af3
commit
cf0ca414ea
3 files changed
+24
-5
No files matched your search
+8
-2
@@ -12,7 +12,7 @@ import checkForPlatformUpdatesInjectable from "./check-for-platform-updates.inje
|
||||
import type { UpdateChannel, ReleaseChannel } from "../../../common/update-channels";
|
||||
import { getPromiseStatus } from "../../../../../common/test-utils/get-promise-status";
|
||||
import loggerInjectable from "../../../../../common/logger.injectable";
|
||||
import type { Logger } from "../../../../../common/logger";
|
||||
import { noop } from "../../../../../common/utils";
|
||||
|
||||
describe("check-for-platform-updates", () => {
|
||||
let checkForPlatformUpdates: CheckForPlatformUpdates;
|
||||
@@ -37,7 +37,13 @@ describe("check-for-platform-updates", () => {
|
||||
|
||||
logErrorMock = jest.fn();
|
||||
|
||||
di.override(loggerInjectable, () => ({ error: logErrorMock }) as unknown as Logger);
|
||||
di.override(loggerInjectable, () => ({
|
||||
error: logErrorMock,
|
||||
debug: noop,
|
||||
info: noop,
|
||||
silly: noop,
|
||||
warn: noop,
|
||||
}));
|
||||
|
||||
checkForPlatformUpdates = di.inject(checkForPlatformUpdatesInjectable);
|
||||
});
|
||||
|
||||
+8
-2
@@ -12,7 +12,7 @@ import asyncFn from "@async-fn/jest";
|
||||
import { getPromiseStatus } from "../../../../../common/test-utils/get-promise-status";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import loggerInjectable from "../../../../../common/logger.injectable";
|
||||
import type { Logger } from "../../../../../common/logger";
|
||||
import { noop } from "../../../../../common/utils";
|
||||
|
||||
describe("download-platform-update", () => {
|
||||
let downloadPlatformUpdate: DownloadPlatformUpdate;
|
||||
@@ -43,7 +43,13 @@ describe("download-platform-update", () => {
|
||||
di.override(electronUpdaterInjectable, () => electronUpdaterFake);
|
||||
|
||||
logErrorMock = jest.fn();
|
||||
di.override(loggerInjectable, () => ({ error: logErrorMock }) as unknown as Logger);
|
||||
di.override(loggerInjectable, () => ({
|
||||
error: logErrorMock,
|
||||
debug: noop,
|
||||
info: noop,
|
||||
silly: noop,
|
||||
warn: noop,
|
||||
}));
|
||||
|
||||
downloadPlatformUpdate = di.inject(downloadPlatformUpdateInjectable);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user