diff --git a/package.json b/package.json index 1f14a635fc..c7cf2ddfa0 100644 --- a/package.json +++ b/package.json @@ -285,7 +285,7 @@ "ws": "^8.8.0" }, "devDependencies": { - "@async-fn/jest": "1.6.1", + "@async-fn/jest": "1.6.4", "@material-ui/core": "^4.12.3", "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.60", 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(); diff --git a/yarn.lock b/yarn.lock index 85ff250b8d..eab88b0ddb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,10 +26,10 @@ static-eval "2.0.2" underscore "1.7.0" -"@async-fn/jest@1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@async-fn/jest/-/jest-1.6.1.tgz#ca298832fa1e7fb650ea2abd1a466acbbcf2cd58" - integrity sha512-UZoKtoccMr2VZjNOeRo6JJRg4Cb2O8EQH3bxIg3jl20Ya1KGIFs5kW3bf/0GRLY9XwL1mKlr1VHtp2vXlvcqtg== +"@async-fn/jest@1.6.4": + version "1.6.4" + resolved "https://registry.yarnpkg.com/@async-fn/jest/-/jest-1.6.4.tgz#202f6a070847123e81c7c6bd5bee5a8f12ebbd40" + integrity sha512-m3T/m6a39f5dbqFj79BGCqudkm42McgMXD7M0ZorKeqqdAbNazay7t+VDOz5qqFHO12frFbbhAB5GnFPoGADPA== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": version "7.16.0"