From 51cfd6a9d5f06786fffa4022c731f824cfe25f86 Mon Sep 17 00:00:00 2001 From: Liza K Date: Wed, 3 Feb 2021 23:24:44 +0200 Subject: [PATCH] ts --- src/plugins/data/server/search/search_service.ts | 2 +- src/plugins/data/server/search/session/mocks.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/data/server/search/search_service.ts b/src/plugins/data/server/search/search_service.ts index e756016f61d59..e1be1e64fd6ee 100644 --- a/src/plugins/data/server/search/search_service.ts +++ b/src/plugins/data/server/search/search_service.ts @@ -328,7 +328,7 @@ export class SearchService implements Plugin { private deleteSession = async (deps: SearchStrategyDependencies, sessionId: string) => { this.cancelSessionSearches(deps, sessionId); - const response = await deps.searchSessionsClient.delete(sessionId); + return deps.searchSessionsClient.delete(sessionId); }; private extendSession = async ( diff --git a/src/plugins/data/server/search/session/mocks.ts b/src/plugins/data/server/search/session/mocks.ts index f75ba6fcc6620..aab5e93d31d3b 100644 --- a/src/plugins/data/server/search/session/mocks.ts +++ b/src/plugins/data/server/search/session/mocks.ts @@ -21,5 +21,6 @@ export function createSearchSessionsClientMock(): jest.Mocked< update: jest.fn(), cancel: jest.fn(), extend: jest.fn(), + delete: jest.fn(), }; }