Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Jul 30, 2021
1 parent 974063f commit a9f26fa
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/plugins/data/common/search/search_source/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ export const searchSourceCommonMock: jest.Mocked<ISearchStartSearchSource> = {
export const createSearchSourceMock = (fields?: SearchSourceFields, response?: any) =>
new SearchSource(fields, {
getConfig: uiSettingsServiceMock.createStartContract().get,
search: jest
.fn()
.mockReturnValue(
of(response ?? { rawResponse: { hits: { hits: [], total: 0 } }, isPartial: false, isRunning: false })
),
search: jest.fn().mockReturnValue(
of(
response ?? {
rawResponse: { hits: { hits: [], total: 0 } },
isPartial: false,
isRunning: false,
}
)
),
onResponse: jest.fn().mockImplementation((req, res) => res),
});

0 comments on commit a9f26fa

Please sign in to comment.