From de386b8bf90ac515e035473eccc466040c3558ef Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 7 Jul 2022 15:53:12 -0400 Subject: [PATCH] Fix type errors Signed-off-by: Sebastian Malton --- .../add-custom-helm-repository-in-preferences.test.ts | 2 +- .../add-helm-repository-from-list-in-preferences.test.ts | 2 +- ...tory-from-list-of-active-repository-in-preferences.test.ts | 2 +- .../opening-application-window-using-tray.test.ts | 4 ++-- .../with-error-suppression/with-error-suppression.test.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts b/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts index c13cfcc7af..943aca900f 100644 --- a/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts +++ b/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts @@ -31,7 +31,7 @@ describe("add custom helm repository in preferences", () => { let execFileMock: AsyncFnMock< ReturnType >; - let getActiveHelmRepositoriesMock: AsyncFnMock<() => AsyncResult>; + let getActiveHelmRepositoriesMock: AsyncFnMock<() => Promise>>; beforeEach(async () => { jest.useFakeTimers(); diff --git a/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts b/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts index 1a4b9db775..74e57cb693 100644 --- a/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts +++ b/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts @@ -29,7 +29,7 @@ describe("add helm repository from list in preferences", () => { let execFileMock: AsyncFnMock< ReturnType >; - let getActiveHelmRepositoriesMock: AsyncFnMock<() => AsyncResult>; + let getActiveHelmRepositoriesMock: AsyncFnMock<() => Promise>>; let callForPublicHelmRepositoriesMock: AsyncFnMock<() => Promise>; beforeEach(async () => { diff --git a/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts b/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts index 0d3dfe331a..096d37ed68 100644 --- a/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts +++ b/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts @@ -23,7 +23,7 @@ jest.mock("../../renderer/components/tooltip/withTooltip", () => ({ describe("remove helm repository from list of active repositories in preferences", () => { let applicationBuilder: ApplicationBuilder; let rendered: RenderResult; - let getActiveHelmRepositoriesMock: AsyncFnMock<() => AsyncResult>; + let getActiveHelmRepositoriesMock: AsyncFnMock<() => Promise>>; let execFileMock: AsyncFnMock< ReturnType >; diff --git a/src/behaviours/quitting-and-restarting-the-app/opening-application-window-using-tray.test.ts b/src/behaviours/quitting-and-restarting-the-app/opening-application-window-using-tray.test.ts index a65847ab00..dedbb33e28 100644 --- a/src/behaviours/quitting-and-restarting-the-app/opening-application-window-using-tray.test.ts +++ b/src/behaviours/quitting-and-restarting-the-app/opening-application-window-using-tray.test.ts @@ -20,8 +20,8 @@ describe("opening application window using tray", () => { let applicationBuilder: ApplicationBuilder; let createElectronWindowMock: jest.Mock; let expectWindowsToBeOpen: (windowIds: string[]) => void; - let callForSplashWindowHtmlMock: AsyncFnMock<() => void>; - let callForApplicationWindowHtmlMock: AsyncFnMock<() => void>; + let callForSplashWindowHtmlMock: AsyncFnMock<() => Promise>; + let callForApplicationWindowHtmlMock: AsyncFnMock<() => Promise>; let focusApplicationMock: jest.Mock; beforeEach(async () => { diff --git a/src/common/utils/with-error-suppression/with-error-suppression.test.ts b/src/common/utils/with-error-suppression/with-error-suppression.test.ts index db4909fd55..12d6a60441 100644 --- a/src/common/utils/with-error-suppression/with-error-suppression.test.ts +++ b/src/common/utils/with-error-suppression/with-error-suppression.test.ts @@ -59,7 +59,7 @@ describe("with-error-suppression", () => { describe("given decorated async function", () => { let decorated: (a: string, b: string) => Promise | Promise; - let toBeDecorated: AsyncFnMock<(a: string, b: string) => number>; + let toBeDecorated: AsyncFnMock<(a: string, b: string) => Promise>; beforeEach(() => { toBeDecorated = asyncFn();