Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Aug 12, 2022
1 parent fb223fd commit 0916a3c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion x-pack/plugins/lens/public/mocks/data_plugin_mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function mockDataPlugin(
extract: (filtersIn: Filter[]) => {
const state = filtersIn.map((filter) => ({
...filter,
meta: { ...filter.meta, index: 'extracted!' },
meta: { ...filter.meta },
}));
return { state, references: [] };
},
Expand All @@ -127,6 +127,13 @@ export function mockDataPlugin(
indexPatterns: {
get: jest.fn().mockImplementation((id) => Promise.resolve({ id, isTimeBased: () => true })),
},
dataViews: {
get: jest
.fn()
.mockImplementation((id) =>
Promise.resolve({ id, isTimeBased: () => true, isPersisted: () => true })
),
},
search: createMockSearchService(),
nowProvider: {
get: jest.fn(),
Expand Down

0 comments on commit 0916a3c

Please sign in to comment.